Class: EzCrypto::Signer

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(encoded,password=nil)

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

from_file(filename,password=nil)

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

generate(strength=2048,type=:rsa)

Generate a new keypair. Defaults to 2048 bit RSA.

new(priv,options = {})

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

dsa?()

Returns true if it is a DSA private key

private_key()

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

public_key()

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

rsa?()

Returns true if it is a RSA private key

sign(data)

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.

verifier()

Returns the corresponding Verifier object.

[Validate]