array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'fr', ), 'this' => array ( 0 => 'function.sodium-crypto-kdf-derive-from-key.php', 1 => 'sodium_crypto_kdf_derive_from_key', ), 'up' => array ( 0 => 'ref.sodium.php', 1 => 'Sodium Fonctions', ), 'prev' => array ( 0 => 'function.sodium-crypto-generichash.php', 1 => 'sodium_crypto_generichash', ), 'next' => array ( 0 => 'function.sodium-crypto-kdf-keygen.php', 1 => 'sodium_crypto_kdf_keygen', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/sodium/functions/sodium-crypto-kdf-derive-from-key.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 7 >= 7.2.0, PHP 8)
sodium_crypto_kdf_derive_from_key — Derive a subkey
$subkey_length
,$subkey_id
,$context
,$key
Derive a subkey from a root key and additional context.
Similar to hash_hkdf().
subkey_length
Length of the key to return (in bytes)
subkey_id
Return the Nth subkey from a given root key. Useful for seeking.
context
Application-specific context.
key
The root key from which the subkey is derived.
A string of pseudorandom (raw binary) bytes.