decodeDigestKey
decodeDigestKey(
encoded,format):Uint8Array
Defined in: src/codecs/digest/key.ts:84
Decode key material emitted by encodeDigestKey back to raw bytes.
The result can be passed directly to importDigestKey.
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.