importDigestKey
importDigestKey(
bytes):Promise<DigestKey>
Defined in: src/codecs/digest/key.ts:54
Import raw operator key material into a DigestKey handle.
Derives a single HMAC-SHA-256 key via HKDF under the domain-separation label
@smonn/ids/digest/hmac. Accepts 16, 24, or 32 bytes. To store or transport key
material, use encodeDigestKey / decodeDigestKey
("hex" or "base64url" — not Crockford base32).
Parameters
Section titled “Parameters”Uint8Array
16, 24, or 32 raw key bytes.
Returns
Section titled “Returns”Promise<DigestKey>
Throws
Section titled “Throws”invalid_key_length if bytes.length is not 16, 24, or 32.