encodeWrappingKey
encodeWrappingKey(
bytes,format):string
Defined in: src/codecs/wrapped/key.ts:85
Encode raw wrapping operator secret bytes for storage in env vars or secret managers.
Supports "hex" (lowercase) and "base64url". Output round-trips through
decodeWrappingKey back to the original bytes.
Parameters
Section titled “Parameters”Uint8Array
format
Section titled “format”Returns
Section titled “Returns”string
Throws
Section titled “Throws”invalid_key_format if format is not "hex" or "base64url".
Throws
Section titled “Throws”invalid_key_length if bytes.length is not 16, 24, or 32.