Jeremie Klein > App-CamelPKI > App::CamelPKI::PrivateKey

Download:
CamelPKI/App-CamelPKI-0.07.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Source  

NAME ^

App::CamelPKI::PrivateKey - Modelise a private key in Camel-PKI.

SYNOPSIS ^

  use App::CamelPKI::PrivateKey;

  my $key = parse App::CamelPKI::PrivateKey($pemstring, -format => "PEM");

  my $derstring = $key->serialize(-format => "DER");

DESCRIPTION ^

This class modelise a private key in Camel-PKI. Each instance is immutable and represents an RSA key, in text mode protected by a passphrase, or stored in a pincard or any other HSM.

METHODS ^

genrsa($keysize)

Generates and returns a new RSA key of $keysize size.

get_public_key

Returns an instance of App::CamelPKI::PublicKey.

as_crypt_openssl_ca_privatekey()

Returns an instance of "Crypt::OpenSSL::CA::PrivateKey" in Crypt::OpenSSL::CA which modelise the certificate, with a cache.

get_modulus()

Performs the same job as the method of the same name in "Crypt::OpenSSL::CA::PrivateKey" in Crypt::OpenSSL::CA