CakeFest 2024: The Official CakePHP Conference

sodium_crypto_box_publickey_from_secretkey

(PHP 7 >= 7.2.0, PHP 8)

sodium_crypto_box_publickey_from_secretkey秘密鍵から公開鍵を計算する

説明

sodium_crypto_box_publickey_from_secretkey(string $secret_key): string

秘密鍵を指定すると、それに対する公開鍵を計算します。

この関数は、crypto_box() 関数で使われるタイプの鍵 (Elliptic Curve Diffie-Hellman over the Montgomery curve, Curve25519; 略して X25519) でのみ動作します。 crypto_sign() 関数で使われるタイプの鍵 (Edwards Digital Signature Algorithm over the Edwards Curve; 略して Ed25519) では動作しません。

パラメータ

secret_key

X25519 形式の秘密鍵

戻り値

X25519 形式の公開鍵を返します。

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top