App::CamelPKI::PEM - Base class for all model classes that manipulate PEM strings


"PEM" in Crypt::OpenSSL::CA::AlphabetSoup means Privacy Enhanced Mail. The PEM system and protocol suite, an early precursor to PGP, is all but fallen into oblivion these days; in the PKIX world, it survives as an SMTP-safe cryptographic payload encapsulation format that states the type of the payload (which "native" ASN.1 format like DER, don't). The general syntax is:

   -----BEGIN FOO----
   <Base64-encoded ASN.1>
   -----END FOO----

The App::CamelPKI::PEM class is a superclass to all model classes which manipulate such formats, such as App::CamelPKI::PrivateKey, App::CamelPKI::PublicKey, App::CamelPKI::Certificate and App::CamelPKI::CRL.


parse($text, %args)

Decodes $text, a plain string, and returns an object of the class in which this method his invoked. Available named arguments are:

-format = "PEM" >
-format = "DER" >

The format of $text. By default, an automatic detection is performed.

load($fileName, %args)

Loads an object from a file on the file system. Named arguments are the same as for "parse".


Returns a string representation of the object. Available named arguments are:

-format = "PEM" >
-format = "DER" >

The format to use for serialization. Default value is "PEM".


This abstract method returns the character chain to use as delimiter (for example RSA PRIVATE KEY for App::CamelPKI::PrivateKey).