WWW::LetsEncrypt::JWK;
use Moose;
extends qw(WWW::LetsEncrypt::JWK);
This is a role that when used together with WWW::LetsEncrypt::JWA as parents will create a JSON Web Key that implements all of the functions needed for signing JSON Web Signature objects. Specifically, this role deals with storing the key object and its parameters.
'key_type' a scalar attribute necessary for holding what the key type may be. The permitted key types should be either: ECDSA, RSA, or HMAC (as per the RFC and our restriction).
'_RefObj' a private object attribute meant to hold the concrete implementation of the key type. Eg: a Crypt::OpenSSL::RSA object is held here for JWK::RSA, and it is used to perform signing (and all associated necessities, such as padding).
This function, when implemented, should create a new JSON Web Key of a specific algorithm type.
Input
$number - key_length $string - key id
Output
JWK Object
This function, when implemented, should return the PKCS#1 encoding of the private key.
Scalar string that is the PKCS#1 representation of the RSA private key.
This function, when implemented, should accept a private key string as a parameter and return new JSON Web Key.
{ private_key => $scalar string of the private key to use, }
This function, when implemented, should accept a private key as per the serialized parameters from JWK and return new JSON Web Key.
{ parameters => \%hash_ref of parameters that are base64url encoded, }
Object method, with _get_public_key_components implemented, returns a valid serialization of a JWK's public key.
$self
\%hash_ref that is the public key components
When implemented, the function takes a single parameter that is the digested value, and returns a signed string.
$scalar string of digested data.
$scalar string of signed digested data.
Object method that returns the rfc7638 JWK thumbprint for the key.
$scalar string that is the thumbprint of the key
Abstract object function which should return a hash of public key parameters (see the RFC)
$self - Object Reference
%hash of the public key parameters
To install WWW::LetsEncrypt, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::LetsEncrypt
CPAN shell
perl -MCPAN -e shell install WWW::LetsEncrypt
For more information on module installation, please visit the detailed CPAN module installation guide.