WWW::LetsEncrypt::JWA
use Moose;
with qw(WWW::LetsEncrypt::JWA ...)
sub sign { my ($self, $message) = @_; ... return ...; }
sub _set_hash { ... }
This is a role that when used together with WWW::LetsEncrypt::JWK as parents will create a JSON Web Key that implements all the functions needed for signing JSON Web Signature objects.
'alg' a scalar attribute meant to hold the algorithm that will be used for signing, as defined in the JWA RFC.
Currently allowed algorithms: ES256, ES384, ES512, RS256, RS384, RS512,
Abstract object function that takes an argument and signs it based off of the internal configuration of the JWA subclass.
Input
$self - Object Reference $message - scalar string of what needs to be signed
Output
scalar octets representing the signature of the message.
Abstract object function that takes a number argument, which is used to determine which SHA2 algorithm will be used for hashing.
Implementers should permit values of (256, 384, 512). All other values should throw an error.
$self - Object Reference $hash - numerical value
boolean if setting the value was successful
Trigger function that is called after the 'alg' parameter has been set. Assuming an accept algorithm was used, this function calls $self->_set_hash with the SHA2 hashing algorithm selected.
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.