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.
Parameters
Section titled “Parameters”encoded
Section titled “encoded”string
format
Section titled “format”Returns
Section titled “Returns”Uint8Array
Throws
Section titled “Throws”invalid_key_format if format is not "hex" or "base64url".
Throws
Section titled “Throws”invalid_key_encoding if the string is malformed for its format.
Throws
Section titled “Throws”invalid_key_length if the decoded bytes are not 16, 24, or 32 bytes.