Skip to content

UnwrapDER

unwrapDER(derEncoded, oid): Uint8Array

Defined in: packages/agent/src/der.ts:144

Extracts a payload from the given derEncoded data, and checks that it was tagged with the given oid.

derEncoded = SEQUENCE(oid, BITSTRING(payload))

Uint8Array

The DER encoded and tagged data

Uint8Array

The DER encoded (and SEQUENCE wrapped!) expected OID

Uint8Array

The unwrapped payload