(PHP 7 >= 7.2.0, PHP 8)
sodium_crypto_box_publickey_from_secretkey — 從私鑰計算公鑰
給定一個私鑰,計算相應的公鑰。
這僅適用於與 crypto_box()(使用基於蒙哥馬利曲線 Curve25519 的橢圓曲線迪菲-赫爾曼金鑰交換,簡稱 X25519)搭配使用的金鑰類型,而不適用於 crypto_sign()(使用基於愛德華茲曲線的愛德華茲數位簽章演算法,簡稱 Ed25519)。
secret_key
X25519 私鑰
X25519 公鑰。