Skip to main content

asn1js

Classes​

Interfaces​

Type Aliases​

AnyParams​

AnyParams = Partial<IAny>


AsnSchemaType​

AsnSchemaType = AsnType | Any | Choice | Repeated


AsnType​

AsnType = BaseBlock | EndOfContent | Boolean | Integer | BitString | OctetString | Null | ObjectIdentifier | Enumerated | Utf8String | RelativeObjectIdentifier | TIME | Sequence | Set | NumericString | PrintableString | TeletexString | VideotexString | IA5String | UTCTime | GeneralizedTime | GraphicString | VisibleString | GeneralString | UniversalString | CharacterString | BmpString | DATE | TimeOfDay | DateTime | Duration | Constructed | Primitive


BaseStringBlockJson​

BaseStringBlockJson = LocalStringValueBlockJson


BitStringJson​

BitStringJson = BaseBlockJson<LocalBitStringValueBlockJson>


BmpStringJson​

BmpStringJson = LocalBmpStringValueBlockJson


BmpStringParams​

BmpStringParams = LocalBmpStringValueBlockParams


BooleanJson​

BooleanJson = BaseBlockJson<LocalBooleanValueBlockJson>


CharacterStringJson​

CharacterStringJson = LocalSimpleStringBlockJson


CharacterStringParams​

CharacterStringParams = LocalSimpleStringBlockParams


ChoiceParams​

ChoiceParams = Partial<IChoice>


CompareSchemaResult​

CompareSchemaResult = CompareSchemaSuccess | CompareSchemaFail


ConstructedJson​

ConstructedJson = BaseBlockJson<LocalConstructedValueBlockJson>


DATEJson​

DATEJson = Utf8StringJson


DATEParams​

DATEParams = Utf8StringParams


DateStringEncoding​

DateStringEncoding = StringEncoding | "iso"


DateTimeJson​

DateTimeJson = Utf8StringJson


DateTimeParams​

DateTimeParams = Utf8StringParams


DurationJson​

DurationJson = Utf8StringJson


DurationParams​

DurationParams = Utf8StringParams


EndOfContentJson​

EndOfContentJson = BaseBlockJson


EndOfContentParams​

EndOfContentParams = BaseBlockParams


EnumeratedJson​

EnumeratedJson = IntegerJson


EnumeratedParams​

EnumeratedParams = IntegerParams


GeneralizedTimeParams​

GeneralizedTimeParams = UTCTimeParams


GeneralStringJson​

GeneralStringJson = LocalSimpleStringBlockJson


GeneralStringParams​

GeneralStringParams = LocalSimpleStringBlockParams


GraphicStringJson​

GraphicStringJson = LocalSimpleStringBlockJson


GraphicStringParams​

GraphicStringParams = LocalSimpleStringBlockParams


HexBlockParams​

HexBlockParams = Partial<IHexBlock>


IA5StringJson​

IA5StringJson = LocalSimpleStringBlockJson


IA5StringParams​

IA5StringParams = LocalSimpleStringBlockParams


IntegerJson​

IntegerJson = BaseBlockJson<LocalIntegerValueBlockJson>


IValueBlock​

IValueBlock = internals.ILocalBaseBlock


NullJson​

NullJson = BaseBlockJson<ValueBlockJson>


NullParams​

NullParams = BaseBlockParams


NumericStringJson​

NumericStringJson = LocalSimpleStringBlockJson


NumericStringParams​

NumericStringParams = LocalSimpleStringBlockParams


OctetStringJson​

OctetStringJson = BaseBlockJson<LocalOctetStringValueBlockJson>


PrimitiveJson​

PrimitiveJson = BaseBlockJson<LocalPrimitiveValueBlockJson>


PrintableStringJson​

PrintableStringJson = LocalSimpleStringBlockJson


PrintableStringParams​

PrintableStringParams = LocalSimpleStringBlockParams


RawDataParams​

RawDataParams = object

Properties​

data?​

optional data: ArrayBuffer | Uint8Array


RepeatedParams​

RepeatedParams = Partial<IRepeated>


SequenceJson​

SequenceJson = ConstructedJson


SequenceParams​

SequenceParams = ConstructedParams


SetJson​

SetJson = ConstructedJson


SetParams​

SetParams = ConstructedParams


StringEncoding​

StringEncoding = "ascii" | "hex"


TeletexStringJson​

TeletexStringJson = LocalSimpleStringBlockJson


TeletexStringParams​

TeletexStringParams = LocalSimpleStringBlockParams


TIMEJson​

TIMEJson = Utf8StringJson


TimeOfDayJson​

TimeOfDayJson = Utf8StringJson


TimeOfDayParams​

TimeOfDayParams = Utf8StringParams


TIMEParams​

TIMEParams = Utf8StringParams


UniversalStringJson​

UniversalStringJson = LocalUniversalStringValueBlockJson


UniversalStringParams​

UniversalStringParams = LocalUniversalStringValueBlockParams


Utf8StringJson​

Utf8StringJson = BaseBlockJson<LocalUtf8StringValueBlockJson>


ValueBlockConstructor()​

ValueBlockConstructor<T> = (...args) => T

Type Parameters​

T​

T extends ValueBlock = ValueBlock

Parameters​

args​

...any[]

Returns​

T


ValueBlockJson​

ValueBlockJson = internals.LocalBaseBlockJson


ValueBlockParams​

ValueBlockParams = internals.LocalBaseBlockParams


VideotexStringJson​

VideotexStringJson = LocalSimpleStringBlockJson


VideotexStringParams​

VideotexStringParams = LocalSimpleStringBlockParams


VisibleStringJson​

VisibleStringJson = LocalSimpleStringBlockJson


VisibleStringParams​

VisibleStringParams = LocalSimpleStringBlockParams

Variables​

DEFAULT_MAX_CONTENT_LENGTH​

const DEFAULT_MAX_CONTENT_LENGTH: number


DEFAULT_MAX_DEPTH​

const DEFAULT_MAX_DEPTH: 100 = 100


DEFAULT_MAX_NODES​

const DEFAULT_MAX_NODES: 10000 = 10000

Functions​

compareSchema()​

compareSchema(root, inputData, inputSchema): CompareSchemaResult

Compare of two ASN.1 object trees

Parameters​

root​

AsnType

Root of input ASN.1 object tree

inputData​

AsnType

Input ASN.1 object tree

inputSchema​

AsnSchemaType

Input ASN.1 schema to compare with

Returns​

CompareSchemaResult

Returns result of comparison


fromBER()​

fromBER(inputBuffer, options): FromBerResult

Major function for decoding ASN.1 BER array into internal library structures

Parameters​

inputBuffer​

BufferSource

ASN.1 BER encoded array of bytes

options​

FromBerOptions = {}

Parser resource limits for untrusted input

Returns​

FromBerResult


HexBlock()​

HexBlock<T>(BaseClass): {(...args): Some<T>; NAME: string; prototype: Some<any>; blockName: string; } & T

Class used as a base block for all remaining ASN.1 classes

Type Parameters​

T​

T extends LocalBaseBlockConstructor<LocalBaseBlock>

Parameters​

BaseClass​

T

Returns​


verifySchema()​

verifySchema(inputBuffer, inputSchema): CompareSchemaResult

ASN.1 schema verification for ArrayBuffer data

Parameters​

inputBuffer​

BufferSource

Input BER-encoded ASN.1 data

inputSchema​

AsnSchemaType

Input ASN.1 schema to verify against to

Returns​

CompareSchemaResult