Skip to main content

Interface: IDerConvertible

Methods

fromDER

fromDER(inputBuffer, inputOffset, inputLength, expectedLength?): number

Base function for converting block from DER encoded array of bytes

Parameters

NameTypeDescription
inputBufferArrayBufferASN.1 DER encoded array
inputOffsetnumberOffset in ASN.1 DER encoded array where decoding should be started
inputLengthnumberMaximum length of array of bytes which can be using in this function
expectedLength?numberExpected length of converted VALUE_HEX buffer

Returns

number

Offset after least decoded byte


toDER

toDER(sizeOnly?): ArrayBuffer

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

Parameters

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

Returns

ArrayBuffer

ASN.1 DER encoded array