@hazae41/asn1
TypeScript icon, indicating that this package has built-in type declarations

1.3.31 • Public • Published
npm i @hazae41/asn1

Node Package 📦

Features

Current features

  • 100% TypeScript and ESM
  • No external dependency
  • Rust-like patterns
  • Zero-copy DER <=> ASN1 reading and writing
  • Almost all universal triplets
  • Implicit and explicit tagged types
  • More string types
  • More encodings

Usage

import { DER } from "@hazae41/asn1"

const input = new Uint8Array([0x01, 0x01, 0xFF])

const triplet = DER.tryFromBytes(input).unwrap() // Boolean

console.log(triplet.toString()) // "BOOLEAN true"

const output = DER.tryToBytes(triplet).unwrap() // Uint8Array([0x01, 0x01, 0xFF])

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.3.31
    12
    • latest

Version History

Package Sidebar

Install

npm i @hazae41/asn1

Weekly Downloads

113

Version

1.3.31

License

MIT

Unpacked Size

401 kB

Total Files

135

Last publish

Collaborators

  • hazae41