format-pem-keys
v1.0.0
Published
Utility functions to format PEM keys
Downloads
4
Readme
Utility functions to format PEM keys.
base64toPEM
Convert a base64 single line key into multiline PEM.
import {base64toPEM} from 'format-pem-keys';
const pem = base64toPEM('abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789');
/*
-----BEGIN PUBLIC KEY-----
abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789
abcdef0123456789abcdef0123456789
-----END PUBLIC KEY-----
*/