略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: sodium_crypto_box_publickey_from_secretkey

2024-11-14

sodium_crypto_box_publickey_from_secretkey

(PHP 7 >= 7.2.0, PHP 8)

sodium_crypto_box_publickey_from_secretkeyCalculate the public key from a secret key

说明

sodium_crypto_box_publickey_from_secretkey(string $secret_key): string

Given a secret key, calculate the corresponding public key.

This only works with the type of keys intended for use with crypto_box() (which uses Elliptic Curve Diffie-Hellman over the Montgomery curve, Curve25519; abbreviated as X25519), not crypto_sign() (which uses Edwards Digital Signature Algorithm over the Edwards Curve with the corresponding paramaters; abbreviated Ed25519).

参数

secret_key

X25519 secret key

返回值

X25519 public key.

add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/function.sodium-crypto-box-publickey-from-secretkey.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3