Skip to content

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.

string

DigestKeyFormat

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.