pkcs12_parser 1.0.0
pkcs12_parser: ^1.0.0 copied to clipboard
Pure-Dart PKCS#12 (.pfx/.p12) parser. Extracts certificates, private and public keys without OpenSSL. Supports PBES1, PBES2 (AES), MAC verification, RSA and EC.
Changelog #
1.0.0 #
Initial release.
Pkcs12.load(bytes, password)— parse a PKCS#12 (.pfx/.p12) container in pure Dart (pointycastle only, no OpenSSL/FFI).- Legacy PBES1 decryption: pbeWithSHA1And3-KeyTripleDES-CBC, 2-KeyTripleDES, RC2-40/128-CBC, RC4-40/128 (RFC 7292 appendix B KDF, BMPString passwords).
- Modern PBES2 decryption: PBKDF2 (hmacWithSHA1/256/384/512) with AES-128/192/256-CBC and des-EDE3-CBC (OpenSSL 3.x default format).
- MAC verification (HMAC-SHA1/256/384/512), on by default, with OpenSSL-style
fallback between
nulland empty-string password encodings. - RSA (PKCS#1) and EC (RFC 5915; P-256/384/521, secp256k1, brainpool) private keys; public key extracted from the certificate SPKI.
- Key ↔ certificate pairing via
localKeyIdwith public-key fallback; issuer-ordered CA chain. - PEM output helpers (
privateKeyPem,certificatePem,caChainPem) and apkcs12_parserCLI executable.