Skip to main content

derive_key

Function derive_key 

Source
pub fn derive_key(
    root_key: &[u8; 32],
    info: &str,
) -> Result<[u8; 32], CryptoError>
Expand description

Derives a 32-byte key from the root key using HKDF-SHA256.

§Arguments

  • root_key - The root key material
  • info - Context string (e.g., “encryption”, “signing”)