Expand description
PEM encoding and decoding helpers for certificates, keys, and generic DER payloads.
Supports no_std builds with alloc and optional std helpers for filesystem I/O.
Functionsยง
- certificate_
chain_ pem_ to_ der_ blocks - Parses all PEM
CERTIFICATEblocks into DER bytes. - certificate_
der_ to_ pem - Converts certificate DER bytes into PEM
CERTIFICATEarmor. - certificate_
pem_ to_ der - Parses one PEM
CERTIFICATEblock into DER bytes. - der_
to_ file - Writes raw DER bytes to a file path.
- der_
to_ pem - Converts DER bytes into PEM armor with caller-provided label.
- der_
to_ pem_ file - Encodes DER as PEM and writes it to a file path.
- ec_
private_ key_ der_ to_ pem_ sec1 - Converts SEC1 EC private-key DER bytes into PEM armor.
- ec_
private_ key_ pem_ to_ der_ sec1 - Parses one PEM SEC1 EC private-key block into DER bytes.
- pem_
file_ to_ der - Reads one PEM block from file and decodes DER payload for
label. - pem_
file_ to_ der_ blocks - Reads all matching PEM blocks from file and decodes DER payloads for
label. - pem_
to_ der - Parses PEM armor into DER bytes and verifies expected label markers.
- pem_
to_ der_ blocks - Parses all PEM blocks matching
labelinto DER payload bytes. - private_
key_ der_ to_ pem_ pkcs8 - Converts PKCS#8 private-key DER bytes into PEM armor.
- private_
key_ pem_ to_ der_ pkcs8 - Parses one PEM PKCS#8 private-key block into DER bytes.
- public_
key_ der_ to_ pem_ spki - Converts SubjectPublicKeyInfo DER bytes into PEM armor.
- public_
key_ pem_ to_ der_ spki - Parses one PEM SPKI public-key block into DER bytes.
- rsa_
private_ key_ der_ to_ pem_ pkcs1 - Converts PKCS#1 RSA private-key DER bytes into PEM armor.
- rsa_
private_ key_ pem_ to_ der_ pkcs1 - Parses one PEM PKCS#1 RSA private-key block into DER bytes.
- rsa_
public_ key_ der_ to_ pem_ pkcs1 - Converts PKCS#1 RSA public-key DER bytes into PEM armor.
- rsa_
public_ key_ pem_ to_ der_ pkcs1 - Parses one PEM PKCS#1 RSA public-key block into DER bytes.