Class: RawData
Special class providing ability to have "toBER/fromBER" for raw ArrayBuffer
Implements
Constructors
constructor
• new RawData(«destructured»?
): RawData
Parameters
Name | Type |
---|---|
«destructured» | Partial <IRawData > |
Returns
Properties
dataView
• dataView: Uint8Array
Since
3.0.0
Accessors
data
• get
data(): ArrayBuffer
Returns
ArrayBuffer
Deprecated
Since v3.0.0
• set
data(value
): void
Parameters
Name | Type |
---|---|
value | ArrayBuffer |
Returns
void
Deprecated
Since v3.0.0
Methods
fromBER
▸ fromBER(inputBuffer
, inputOffset
, inputLength
): number
Base function for converting block from BER encoded array of bytes
Parameters
Name | Type | Description |
---|---|---|
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
toBER
▸ toBER(sizeOnly?
): ArrayBuffer
Encoding of current ASN.1 block into ASN.1 encoded array (BER rules)
Parameters
Name | Type | Description |
---|---|---|
sizeOnly? | boolean | Flag that we need only a size of encoding, not a real array of bytes |
Returns
ArrayBuffer
ASN.1 BER encoded array