importOpaqueKey
importOpaqueKey(
bytes):Promise<OpaqueKey>
Defined in: src/codecs/opaque/key.ts:51
Imports operator key material into an OpaqueKey handle for the Opaque Timestamp codec.
The bytes are HKDF input keying material, not the AES key itself: the
codec derives an AES-256 key from them via HKDF under the label
@smonn/ids/opaque/aes (ADR-0027). Accepts 16, 24, or 32 bytes; the input
size sets the entropy floor only — a 16-byte handle still yields AES-256 with
a 128-bit entropy floor. To store or transport key material, use
encodeOpaqueKey / decodeOpaqueKey ("hex" or "base64url" —
not Crockford base32).
Parameters
Section titled “Parameters”Uint8Array
16, 24, or 32 bytes of raw key material.
Returns
Section titled “Returns”Promise<OpaqueKey>
Throws
Section titled “Throws”invalid_key_length if bytes.length is not 16, 24, or 32.