The decoded bytes of the contents. Typically a DER encoded ASN.1 structure.
The type, taken from the preamble (i.e. "RSA PRIVATE KEY").
Return exists Proc-Type header or empty string
Return a header or empty string with given key.
Set a header with given key/value.
Encode to PEM formatted buffer.
Return a friendly JSON object for debuging.
Encode to PEM formatted string.
Returns the body.
Parse PEM formatted buffer, returns one or more PEM object. If there is no PEM object, it will throw error.
buffer to parse.
Generated using TypeDoc
Implements the PEM data encoding, which originated in Privacy Enhanced Mail. The most common use of PEM encoding today is in TLS keys and certificates. See RFC 1421.
A PEM represents a PEM encoded structure.
The encoded form is:
-----BEGIN Type----- Headers base64-encoded Bytes -----END Type-----
Headers like:
Proc-Type: 4,ENCRYPTED DEK-Info: DES-EDE3-CBC,29DE8F99F382D122