Content-Length: 290904 | pFad | https://github.com/hazae41/x509

A6 GitHub - hazae41/x509: Zero-copy X.509 certificates for the web 🏎️
Skip to content

hazae41/x509

Repository files navigation

npm i @hazae41/x509

Node Package 📦

Features

Current features

  • 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
  • X.509 extensions (v3)

Usage

Reading DER

import { Certificate, X509 } from "@hazae41/x509";

const bytes = await readFile("./cert.der")
const cert = X509.tryReadFromBytes(bytes, Certificate).unwrap()

Reading PEM

import { PEM, Certificate, X509 } from "@hazae41/x509";

const bytes = PEM.tryParse(await readFile("./cert.pem", "utf8")).unwrap()
const cert = X509.tryReadFromBytes(bytes, Certificate).unwrap()








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/hazae41/x509

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy