1.0.5 • Published 5 years ago

ber-parser v1.0.5

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

ber-parser

A simple ASN1 BER parser

purpose

This module implements parsing of data encoded according to ASN1 Basic Encoding Rules (BER) of ITU-T X.690 Recommendations.

usage

All the processing is done within one function: readTlv(buffer: Buffer, pos: number, parseValues?: boolean)

  • buffer - actual data to parse
  • pos - start position in the buffer
  • parseValue - indicates whether the individual type-dependant parsers should be applied to values (they are declared in a CLASS_TYPES object for some common types)

You can print out to console the contents of the resulting object with an additional function showTlv(tlv).

example

const {readTlv, showTlv} = require('ber-parser');
showTlv(readTlv(someBuffer, 0, true));
1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago