Mark Allen > Authen-HTTP-Signature-0.02 > Authen::HTTP::Signature::Method::RSA

Download:
Authen-HTTP-Signature-0.02.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Module Version: 0.02   Source  

NAME ^

Crypt::HTTP::Signature::Method::RSA - Compute digest using asymmetric keys

PURPOSE ^

This class uses asymmetric RSA keys to compute a HTTP signature digest. It implements the RSA-SHA{1, 256, 512} algorithms.

ATTRIBUTES ^

key

Holds the key data. This should be a string that Crypt::OpenSSL::RSA can instantiate into a private or public key.

If the operation is sign(), then this attribute must hold a private key. In other words, the string this attribute holds should start with

  -----BEGIN RSA PRIVATE KEY-----

If the operation is verify(), then this attribute must hold a public key. In other words, the string this attribute holds should start with

  -----BEGIN PUBLIC KEY-----
data

Holds the data to be signed or verified. This is typically the signing_string attribute from Authen::HTTP::Signature. Read-only. Required.

hash

Digest algorithm. Read-only. Required.

METHODS ^

sign()

Signs data using key.

Returns a base 64 encoded signature.

verify()

This method validates a signature was generated by a specific private key by using the corresponding public key.

Takes a Base64 encoded signature string as input.

Returns a boolean.

SEE ALSO ^

Authen::HTTP::Signature

syntax highlighting: