PHP.nl

sodium_crypto_kdf_derive_from_key

sodium_crypto_kdf_derive_from_key

Derive a subkey

string **sodium_crypto_kdf_derive_from_key** int $subkey_length int $subkey_id string $context string $key

Derive a subkey from a root key and additional context.

Similar to . hash_hkdf

subkey_lengthLength of the key to return (in bytes)

subkey_idReturn the Nth subkey from a given root key. Useful for seeking.

contextApplication-specific context.

keyThe root key from which the subkey is derived.

A string of pseudorandom (raw binary) bytes.