array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'es', ), 'this' => array ( 0 => 'function.sodium-crypto-sign.php', 1 => 'sodium_crypto_sign', ), 'up' => array ( 0 => 'ref.sodium.php', 1 => 'Sodium Funciones', ), 'prev' => array ( 0 => 'function.sodium-crypto-sign-verify-detached.php', 1 => 'sodium_crypto_sign_verify_detached', ), 'next' => array ( 0 => 'function.sodium-crypto-stream-keygen.php', 1 => 'sodium_crypto_stream_keygen', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/sodium/functions/sodium-crypto-sign.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 7 >= 7.2.0, PHP 8)
sodium_crypto_sign — Sign a message
Sign a message with a secret key, that can be verified by the corresponding public key. This function attaches the signature to the message. See sodium_crypto_sign_detached() for detached signatures.
message
Message to sign.
secret_key
Secret key. See sodium_crypto_sign_secretkey()
Signed message (not encrypted).