Skip to content

decodeSigningKey

decodeSigningKey(encoded, format): Uint8Array

Defined in: src/codecs/signed/key.ts:85

Decode key material emitted by encodeSigningKey back to raw bytes.

The result can be passed directly to importSigningKey.

string

SigningKeyFormat

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.