array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'function.sodium-crypto-sign-detached.php', 1 => 'sodium_crypto_sign_detached', 2 => 'Sign the message', ), 'up' => array ( 0 => 'ref.sodium.php', 1 => 'Sodium 函数', ), 'prev' => array ( 0 => 'function.sodium-crypto-sign.php', 1 => 'sodium_crypto_sign', ), 'next' => array ( 0 => 'function.sodium-crypto-sign-ed25519-pk-to-curve25519.php', 1 => 'sodium_crypto_sign_ed25519_pk_to_curve25519', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/sodium/functions/sodium-crypto-sign-detached.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

sodium_crypto_sign_detached

(PHP 7 >= 7.2.0, PHP 8)

sodium_crypto_sign_detachedSign the message

说明

sodium_crypto_sign_detached(string $message, #[\SensitiveParameter] string $secret_key): string

Sign a message with a secret key, that can be verified by the corresponding public key. This function returns a detached signature.

参数

message

Message to sign.

secret_key

Secret key. See sodium_crypto_sign_secretkey()

返回值

Cryptographic signature.