Registry / crypto / pem-parser

pem-parser

JSON →
library0.1.1rscratesunverified

A simple tool to convert RSA keys from PEM to DER format.

# Cargo.toml [dependencies] pem-parser = "0.1.1"
INSTALL
IMPORT
SIG · PEM-PARSER
P
pem-parser
cryptorustv0.1.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

parse_pem
✓ use pem_parser::parse_pem;

Parses a PEM-encoded RSA key and returns the DER-encoded bytes.

use pem_parser::parse_pem; let pem_data = b"-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----"; let der = parse_pem(pem_data).unwrap(); println!("DER length: {}", der.len());
Debug
Known issues
gotchaOnly supports RSA keys; other PEM types (e.g., EC) will fail.
fix
Use a more comprehensive library like pem or openssl for other key types.
affects: >=0.1.0
Upgrade
Version history
0.1.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
23 hits · last 30 days
node
22
Resources
pem-parser — cargo add pem-parser · libregistry