Skip to content
asn1jsasn1jsasn1jsv4.1.0

Enumerated

new Enumerated(parameters?): Enumerated

IntegerParams = {}

Enumerated

Integer.constructor

blockLength: number

Integer.blockLength


error: string

Integer.error


idBlock: LocalIdentificationBlock

Integer.idBlock


lenBlock: LocalLengthBlock

Integer.lenBlock


name: string

Integer.name


optional: boolean

Integer.optional


optional primitiveSchema?: BaseBlock<ValueBlock, LocalBaseBlockJson>

Integer.primitiveSchema


valueBeforeDecodeView: Uint8Array

3.0.0

Integer.valueBeforeDecodeView


valueBlock: LocalIntegerValueBlock

Integer.valueBlock


warnings: string[]

Integer.warnings


static NAME: string = "ENUMERATED"

Name of the block

Integer.NAME

get valueBeforeDecode(): ArrayBuffer

ArrayBuffer

set valueBeforeDecode(value): void

ArrayBuffer

void

Integer.valueBeforeDecode

convertFromDER(): Integer

Convert current Integer value from DER to BER format

Integer

Integer.convertFromDER


convertToDER(): Integer

Integer

Integer.convertToDER


fromBER(inputBuffer, inputOffset, inputLength, context?): number

Base function for converting block from BER encoded array of bytes

Uint8Array

ASN.1 BER encoded array

number

Offset in ASN.1 BER encoded array where decoding should be started

number

Maximum length of array of bytes which can be using in this function

FromBerContext

number

Offset after least decoded byte

Integer.fromBER


isEqual(other): other is Enumerated

Determines whether two object instances are equal

unknown

Object to compare with the current object

other is Enumerated

Integer.isEqual


toBER(sizeOnly?, writer?): ArrayBuffer

Encoding of current ASN.1 block into ASN.1 encoded array (BER rules)

boolean

Flag that we need only a size of encoding, not a real array of bytes

ViewWriter

ArrayBuffer

ASN.1 BER encoded array

Integer.toBER


toBigInt(): bigint

Converts Integer into BigInt

bigint

3.0.0

Integer.toBigInt


toJSON(): BaseBlockJson<LocalIntegerValueBlockJson>

Returns a JSON representation of an object

BaseBlockJson<LocalIntegerValueBlockJson>

JSON object

Integer.toJSON


toString(encoding?): string

Returns a string representation of an object.

StringEncoding = "ascii"

string

Integer.toString


static blockName(): string

Aux function, need to get a block name. Need to have it here for inheritance

string

Returns name of the block

Integer.blockName


static fromBigInt(value): Integer

Creates Integer from BigInt value

string | number | bigint | boolean

BigInt value

Integer

ASN.1 Integer

3.0.0

Integer.fromBigInt