Module: utils/pem

Methods

(static) decode(pem) → {Object}

Decode PEM into a manageable format.

Parameters:
Name Type Description
pem String
Source:
Throws:

on parse error

Returns:
Type
Object

(static) encode(der, type, suffixnullable) → {String}

Encode DER to PEM.

Parameters:
Name Type Attributes Description
der Buffer
type String

e.g. "ec".

suffix String <nullable>

e.g. "public key".

Source:
Returns:
Type
String

(static) parse(pem) → {Array:.<Object:>}

Parse PEM into separated chunks.

Parameters:
Name Type Description
pem String
Source:
Throws:

on parse error

Returns:
Type
Array:.<Object:>