Class: EzCrypto::Verifier

Class | EzCrypto::Verifier
In: | lib/ezsig.rb
Parent: | Object

The Verifier is used for verifying signatures. If you use the decode or from_file methods you can use either raw PEM encoded public keys or certificate.

### Methods

cert? decode digest dsa? from_file from_pkyp load_all_from_file new public_key register_with_pkyp rsa? send_to_pkyp verify

### Public Class methods

decode(encoded)

Decodes a PEM encoded Certificate or Public Key and returns a Verifier object.

from_file(filename)

Decodes a PEM encoded Certificate or Public Key from a file and returns a Verifier object.

from_pkyp(digest)

Load a certificate or public key from PKYP based on it‘s hex digest

load_all_from_file(filename)

Decodes all certificates or public keys in a file and returns an array.

new(pub)

Initializes a Verifier using a OpenSSL public key object.

### Public Instance methods

cert?()

Is the Verifier a Certificate or not.

digest()

Returns the SHA1 hexdigest of the DER encoded public key. This can be used as a unique key identifier.

dsa?()

Is this a DSA key?

public_key()

Returns the OpenSSL public key object. You would normally not need to use this.

register_with_pkyp()

Register the public key or certificate at PKYP

rsa?()

Is this a RSA key?

verify(sig,data)

Returns true if the public key signed the given data.

### Protected Instance methods

send_to_pkyp(pem)

[Validate]