array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'fr', ), 'this' => array ( 0 => 'function.sodium-crypto-box-keypair-from-secretkey-and-publickey.php', 1 => 'sodium_crypto_box_keypair_from_secretkey_and_publickey', ), 'up' => array ( 0 => 'ref.sodium.php', 1 => 'Sodium Fonctions', ), 'prev' => array ( 0 => 'function.sodium-crypto-auth.php', 1 => 'sodium_crypto_auth', ), 'next' => array ( 0 => 'function.sodium-crypto-box-keypair.php', 1 => 'sodium_crypto_box_keypair', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/sodium/functions/sodium-crypto-box-keypair-from-secretkey-and-publickey.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 7 >= 7.2.0, PHP 8)
sodium_crypto_box_keypair_from_secretkey_and_publickey — Create a unified keypair string from a secret key and public key
$secret_key
, string $public_key
): stringThis function exists to satisfy the API requirements of e.g. crypto_box(). Pass in one party's secret key and the other's public key, and you will obtain a "keypair" for your conversation.
secret_key
Secret key.
public_key
Public key.
X25519 Keypair.