BaseBlock
Extends
Section titled “Extends”LocalBaseBlock
Extended by
Section titled “Extended by”BaseStringBlockPrimitiveConstructedEndOfContentNullBooleanOctetStringBitStringIntegerObjectIdentifierRelativeObjectIdentifier
Type Parameters
Section titled “Type Parameters”T extends ValueBlock = ValueBlock
J extends ValueBlockJson = ValueBlockJson
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BaseBlock<
T,J>(__namedParameters?,valueBlockType?):BaseBlock<T,J>
Parameters
Section titled “Parameters”__namedParameters?
Section titled “__namedParameters?”BaseBlockParams = {}
valueBlockType?
Section titled “valueBlockType?”Returns
Section titled “Returns”BaseBlock<T, J>
Overrides
Section titled “Overrides”LocalBaseBlock.constructor
Properties
Section titled “Properties”blockLength
Section titled “blockLength”blockLength:
number
Inherited from
Section titled “Inherited from”LocalBaseBlock.blockLength
error:
string
Inherited from
Section titled “Inherited from”LocalBaseBlock.error
idBlock
Section titled “idBlock”idBlock:
LocalIdentificationBlock
lenBlock
Section titled “lenBlock”lenBlock:
LocalLengthBlock
name:
string
Implementation of
Section titled “Implementation of”optional
Section titled “optional”optional:
boolean
Implementation of
Section titled “Implementation of”primitiveSchema?
Section titled “primitiveSchema?”
optionalprimitiveSchema?:BaseBlock<ValueBlock,LocalBaseBlockJson>
Implementation of
Section titled “Implementation of”valueBeforeDecodeView
Section titled “valueBeforeDecodeView”valueBeforeDecodeView:
Uint8Array
3.0.0
Inherited from
Section titled “Inherited from”LocalBaseBlock.valueBeforeDecodeView
valueBlock
Section titled “valueBlock”valueBlock:
T
warnings
Section titled “warnings”warnings:
string[]
Inherited from
Section titled “Inherited from”LocalBaseBlock.warnings
staticNAME:string="BaseBlock"
Name of the block
Overrides
Section titled “Overrides”LocalBaseBlock.NAME
Accessors
Section titled “Accessors”valueBeforeDecode
Section titled “valueBeforeDecode”Get Signature
Section titled “Get Signature”get valueBeforeDecode():
ArrayBuffer
Returns
Section titled “Returns”ArrayBuffer
Set Signature
Section titled “Set Signature”set valueBeforeDecode(
value):void
Parameters
Section titled “Parameters”ArrayBuffer
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”LocalBaseBlock.valueBeforeDecode
Methods
Section titled “Methods”fromBER()
Section titled “fromBER()”fromBER(
inputBuffer,inputOffset,inputLength,context?):number
Base function for converting block from BER encoded array of bytes
Parameters
Section titled “Parameters”inputBuffer
Section titled “inputBuffer”Uint8Array
ASN.1 BER encoded array
inputOffset
Section titled “inputOffset”number
Offset in ASN.1 BER encoded array where decoding should be started
inputLength
Section titled “inputLength”number
Maximum length of array of bytes which can be using in this function
context?
Section titled “context?”FromBerContext
Returns
Section titled “Returns”number
Offset after least decoded byte
Implementation of
Section titled “Implementation of”isEqual()
Section titled “isEqual()”isEqual(
other):other is BaseBlock<T, J>
Determines whether two object instances are equal
Parameters
Section titled “Parameters”unknown
Object to compare with the current object
Returns
Section titled “Returns”other is BaseBlock<T, J>
toBER()
Section titled “toBER()”toBER(
sizeOnly?,writer?):ArrayBuffer
Encoding of current ASN.1 block into ASN.1 encoded array (BER rules)
Parameters
Section titled “Parameters”sizeOnly?
Section titled “sizeOnly?”boolean
Flag that we need only a size of encoding, not a real array of bytes
writer?
Section titled “writer?”Returns
Section titled “Returns”ArrayBuffer
ASN.1 BER encoded array
Implementation of
Section titled “Implementation of”toJSON()
Section titled “toJSON()”toJSON():
BaseBlockJson<J>
Returns a JSON representation of an object
Returns
Section titled “Returns”JSON object
Overrides
Section titled “Overrides”LocalBaseBlock.toJSON
toString()
Section titled “toString()”toString(
encoding?):string
Returns a string representation of an object.
Parameters
Section titled “Parameters”encoding?
Section titled “encoding?”StringEncoding = "ascii"
Returns
Section titled “Returns”string
blockName()
Section titled “blockName()”
staticblockName():string
Aux function, need to get a block name. Need to have it here for inheritance
Returns
Section titled “Returns”string
Returns name of the block
Inherited from
Section titled “Inherited from”LocalBaseBlock.blockName