Skip to content
asn1jsasn1jsasn1jsv4.1.0

Primitive

  • BaseBlock<LocalPrimitiveValueBlock, LocalPrimitiveValueBlockJson>

new Primitive(parameters?): Primitive

PrimitiveParams = {}

Primitive

BaseBlock.constructor

blockLength: number

BaseBlock.blockLength


error: string

BaseBlock.error


idBlock: LocalIdentificationBlock

BaseBlock.idBlock


lenBlock: LocalLengthBlock

BaseBlock.lenBlock


name: string

BaseBlock.name


optional: boolean

BaseBlock.optional


optional primitiveSchema?: BaseBlock<ValueBlock, LocalBaseBlockJson>

BaseBlock.primitiveSchema


valueBeforeDecodeView: Uint8Array

3.0.0

BaseBlock.valueBeforeDecodeView


valueBlock: LocalPrimitiveValueBlock

BaseBlock.valueBlock


warnings: string[]

BaseBlock.warnings


static NAME: string = "PRIMITIVE"

Name of the block

BaseBlock.NAME

get valueBeforeDecode(): ArrayBuffer

ArrayBuffer

set valueBeforeDecode(value): void

ArrayBuffer

void

BaseBlock.valueBeforeDecode

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

BaseBlock.fromBER


isEqual(other): other is Primitive

Determines whether two object instances are equal

unknown

Object to compare with the current object

other is Primitive

BaseBlock.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

BaseBlock.toBER


toJSON(): BaseBlockJson<LocalPrimitiveValueBlockJson>

Returns a JSON representation of an object

BaseBlockJson<LocalPrimitiveValueBlockJson>

JSON object

BaseBlock.toJSON


toString(encoding?): string

Returns a string representation of an object.

StringEncoding = "ascii"

string

BaseBlock.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

BaseBlock.blockName