PHP - Manual: sodium_crypto_box_keypair_from_secretkey_and_publickey
2024-12-22
(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.
官方地址:https://www.php.net/manual/en/function.sodium-crypto-box-keypair-from-secretkey-and-publickey.php