Skip to main content

Class: ValueBlock

Hierarchy

  • LocalBaseBlock

    ValueBlock

Implements

Constructors

constructor

new ValueBlock(param0?): ValueBlock

Creates and initializes an object instance of that class

Parameters

NameTypeDescription
param0LocalBaseBlockParamsInitialization parameters

Returns

ValueBlock

Inherited from

internals.LocalBaseBlock.constructor

Properties

blockLength

blockLength: number

Implementation of

IValueBlock.blockLength

Inherited from

internals.LocalBaseBlock.blockLength


error

error: string

Implementation of

IValueBlock.error

Inherited from

internals.LocalBaseBlock.error


valueBeforeDecodeView

valueBeforeDecodeView: Uint8Array

Since

3.0.0

Inherited from

internals.LocalBaseBlock.valueBeforeDecodeView


warnings

warnings: string[]

Implementation of

IValueBlock.warnings

Inherited from

internals.LocalBaseBlock.warnings


NAME

Static NAME: string = "valueBlock"

Overrides

internals.LocalBaseBlock.NAME

Accessors

valueBeforeDecode

get valueBeforeDecode(): ArrayBuffer

Returns

ArrayBuffer

Deprecated

since version 3.0.0

Inherited from

internals.LocalBaseBlock.valueBeforeDecode

set valueBeforeDecode(value): void

Parameters

NameType
valueArrayBuffer

Returns

void

Deprecated

since version 3.0.0

Inherited from

internals.LocalBaseBlock.valueBeforeDecode

Methods

fromBER

fromBER(inputBuffer, inputOffset, inputLength): number

Base function for converting block from BER encoded array of bytes

Parameters

NameTypeDescription
inputBufferUint8Array | ArrayBufferASN.1 BER encoded array
inputOffsetnumberOffset in ASN.1 BER encoded array where decoding should be started
inputLengthnumberMaximum length of array of bytes which can be using in this function

Returns

number

Offset after least decoded byte

Implementation of

IBerConvertible.fromBER


toBER

toBER(sizeOnly?, writer?): ArrayBuffer

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

Parameters

NameTypeDescription
sizeOnly?booleanFlag that we need only a size of encoding, not a real array of bytes
writer?ViewWriter-

Returns

ArrayBuffer

ASN.1 BER encoded array

Implementation of

IBerConvertible.toBER


toJSON

toJSON(): LocalBaseBlockJson

Returns a JSON representation of an object

Returns

LocalBaseBlockJson

JSON object

Inherited from

internals.LocalBaseBlock.toJSON


blockName

blockName(): string

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

Returns

string

Returns name of the block

Inherited from

internals.LocalBaseBlock.blockName