Node Package ๐ฆ
- 100% TypeScript and ESM
- Zero-copy reading and writing
- No external dependency
- No cryptography
- Rust-like patterns
- Zero-copy PEM <=> DER <=> ASN1 <=> X509 reading and writing
- X.509 certificates (v3)
- X.501 encoding and decoding
import { Certificate, X509 } from "@hazae41/x509";
const bytes = await readFile("./cert.der")
const cert = X509.tryReadFromBytes(bytes, Certificate).unwrap()
import { PEM, Certificate, X509 } from "@hazae41/x509";
const bytes = PEM.tryParse(await readFile("./cert.pem", "utf8")).unwrap()
const cert = X509.tryReadFromBytes(bytes, Certificate).unwrap()