Skip to content

decodeWrappingKey

decodeWrappingKey(encoded, format): Uint8Array

Defined in: src/codecs/wrapped/key.ts:98

Decode key material emitted by encodeWrappingKey back to raw bytes.

The result can be passed directly to importWrappingKey.

string

WrappingKeyFormat

Uint8Array

invalid_key_format if format is not "hex" or "base64url".

invalid_key_encoding if the string is malformed for its format.

invalid_key_length if the decoded bytes are not 16, 24, or 32 bytes.