Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
Clean up (#5)
Browse files Browse the repository at this point in the history
* Clean up readme and fix doc link

* v1.0.1
  • Loading branch information
jsumners authored Jun 5, 2022
1 parent 83f4e93 commit a16c7a6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 deletions.
23 changes: 6 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
node-asn1 is a library for encoding and decoding ASN.1 datatypes in pure JS.
Currently BER encoding is supported; at some point I'll likely have to do DER.
# `@ldapjs/asn1`

## Usage

Mostly, if you're *actually* needing to read and write ASN.1, you probably don't
need this readme to explain what and why. If you have no idea what ASN.1 is,
see this: ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc

The source is pretty much self-explanatory, and has read/write methods for the
common types out there.
`@ldapjs/asn1` is a library for encoding and decoding ASN.1 datatypes in pure
JS. Currently BER encoding is supported.

### Decoding

The following reads an ASN.1 sequence with a boolean.

var Ber = require('asn1').Ber;
var Ber = require('@ldapjs/asn1').Ber;

var reader = new Ber.Reader(Buffer.from([0x30, 0x03, 0x01, 0x01, 0xff]));

Expand All @@ -27,7 +20,7 @@ The following reads an ASN.1 sequence with a boolean.

The following generates the same payload as above.

var Ber = require('asn1').Ber;
var Ber = require('@ldapjs/asn1').Ber;

var writer = new Ber.Writer();

Expand All @@ -41,10 +34,6 @@ The following generates the same payload as above.

npm install asn1

## License

MIT.

## Bugs

See <https://github.com/joyent/node-asn1/issues>.
See <https://github.com/ldapjs/asn1/issues>.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2011 Mark Cavage <[email protected]> All rights reserved.

// If you have no idea what ASN.1 or BER is, see this:
// ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc
// https://web.archive.org/web/20220314051854/http://luca.ntop.org/Teaching/Appunti/asn1.html

const Ber = require('./ber/index')

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"name": "@ldapjs/asn1",
"description": "Contains parsers and serializers for ASN.1 (currently BER only)",
"version": "1.0.0",
"version": "1.0.1",
"repository": {
"type": "git",
"url": "git://github.com/ldapjs/asn1.git"
Expand Down

0 comments on commit a16c7a6

Please sign in to comment.