decodeDerBitStringOrThrow
decodeDerBitStringOrThrow
Decodes a BIT STRING element (tag 0x03) into a DerBitString.
Unused trailing bits are returned as encoded, with a violation of X.690 §11.2.1 reported through DerBitString.nonZeroPadding, since certificates in the wild carry them.
ts
function decodeDerBitStringOrThrow(
element: DerElement,
): DerBitStringParameters
element:DerElement
Throws
- if
elementis mis-tagged, or claims more than seven unused bits.