Skip to content
asn1jsasn1jsasn1jsv4.1.0

BaseStringBlock

T extends LocalStringValueBlock = LocalStringValueBlock

J extends BaseStringBlockJson = BaseStringBlockJson

new BaseStringBlock<T, J>(__namedParameters?, stringValueBlockType): BaseStringBlock<T, J>

BaseStringBlockParams = {}

new () => T

BaseStringBlock<T, J>

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: T

BaseBlock.valueBlock


warnings: string[]

BaseBlock.warnings


static NAME: string = "BaseStringBlock"

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

ArrayBuffer | Uint8Array<ArrayBufferLike>

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


abstract fromBuffer(inputBuffer): void

Function converting ArrayBuffer into ASN.1 internal string

ArrayBuffer | Uint8Array<ArrayBufferLike>

ASN.1 BER encoded array

void


abstract fromString(inputString): void

Creates a class object from the string

string

void

IStringConvertible.fromString


getValue(): string

String value

string

3.0.0


isEqual(other): other is BaseStringBlock<T, J>

Determines whether two object instances are equal

unknown

Object to compare with the current object

other is BaseStringBlock<T, J>

BaseBlock.isEqual


setValue(value): void

String value

string

String value

void

3.0.0


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<J>

Returns a JSON representation of an object

BaseBlockJson<J>

JSON object

BaseBlock.toJSON


toString(encoding?): string

Returns a string representation of an object.

StringEncoding = "ascii"

string

IStringConvertible.toString

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