Derive a deterministic key from an ARID using a specific salt.
Uses HKDF to derive key material from the ARID, ensuring that:
Port of derive_key() from arid_derivation.rs lines 8-29.
derive_key()
Domain-specific salt to ensure different backends derive different keys
The ARID to derive from
Length of output in bytes (typically 20 or 32)
Derived key bytes
const key = deriveKey(new TextEncoder().encode("my-salt"), arid, 32); Copy
const key = deriveKey(new TextEncoder().encode("my-salt"), arid, 32);
Derive a deterministic key from an ARID using a specific salt.
Uses HKDF to derive key material from the ARID, ensuring that:
Port of
derive_key()from arid_derivation.rs lines 8-29.