Socket
Socket
Sign inDemoInstall

@hazae41/asn1

Package Overview
Dependencies
9
Maintainers
1
Versions
91
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @hazae41/asn1

Zero-copy ASN.1 <=> DER encoding for the web


Version published
Weekly downloads
1
decreased by-83.33%
Maintainers
1
Created
Weekly downloads
 

Readme

Source
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

Upcoming features

  • 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])

Keywords

FAQs

Last updated on 11 Mar 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc