pem-codec
TypeScript icon, indicating that this package has built-in type declarations

0.1.17 • Public • Published

PEM Codec

Unittests

A pure JS module intended primarily for use in the browser, to encode and decode PEM style ascii armoured data.

The could be a PEM message, a openGPG message or a X509 certificate or key. All of these types of objects use the same basic data format and can share this module.

PEM Codec has no dependencies on the browser environment apart from the atob/btoa Base64 funtions.

A PEM_Message object can be initialised as simply as o = new PEM_Message({ type: "TEST OBJECT", string_data: "abcde" });

The encoded string of the object can be extracted with encode like: var encoded = o.encode();

And it can be roundtripped back to an object as simply as: var o2 = PEM_Message.decode(encoded);

Readme

Keywords

Package Sidebar

Install

npm i pem-codec

Weekly Downloads

6

Version

0.1.17

License

GPL-3.0

Unpacked Size

134 kB

Total Files

16

Last publish

Collaborators

  • rgammans