Class EzCrypto::Signer
In: lib/ezsig.rb
Parent: Object

The signer is used for signing stuff. It encapsulates the functionality of a private key.

Methods

decode   dsa?   from_file   generate   new   private_key   public_key   rsa?   sign   verifier  

Public Class methods

Decode a PEM encoded Private Key and return a signer. Takes an optional password

Decode a PEM encoded Private Key file and return a signer. Takes an optional password

Generate a new keypair. Defaults to 2048 bit RSA.

Initialize a Signer with a OpenSSL Private Key. You generally should not call new directly. Unless you are interfacing with your own underlying OpenSSL code.

Public Instance methods

Returns true if it is a DSA private key

Returns the OpenSSL Private Key object. You normally do not need to use this.

Returns the OpenSSL Public Key object. You normally do not need to use this.

Returns true if it is a RSA private key

signs data using the private key and the corresponding digest function. SHA1 for RSA and DSS1 for DSA. 99% of signing use these parameters. Email a request or send me a patch if you have other requirements.

Returns the corresponding Verifier object.

[Validate]