Skip to main content

ValueBlock

Extends

  • LocalBaseBlock

Implements

Constructors

new ValueBlock()

new ValueBlock(param0): ValueBlock

Creates and initializes an object instance of that class

Parameters

param0: LocalBaseBlockParams = {}

Initialization 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"

Name of the block

Overrides

internals.LocalBaseBlock.NAME

Accessors

valueBeforeDecode

get valueBeforeDecode(): ArrayBuffer

Deprecated

since version 3.0.0

set valueBeforeDecode(value): void

Deprecated

since version 3.0.0

Parameters

value: ArrayBuffer

Returns

ArrayBuffer

Inherited from

internals.LocalBaseBlock.valueBeforeDecode

Methods

fromBER()

fromBER(inputBuffer, inputOffset, inputLength): number

Base function for converting block from BER encoded array of bytes

Parameters

inputBuffer: Uint8Array | ArrayBuffer

ASN.1 BER encoded array

inputOffset: number

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

inputLength: number

Maximum 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

sizeOnly?: boolean

Flag 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()

static 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