note 125005 added to function.sodium-crypto-sign-verify-detached
| From: | Anonymous@php.net | Date: | Tue, 12 May 2020 23:50:53 +0000 |
| Subject: | note 125005 added to function.sodium-crypto-sign-verify-detached | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-214619@lists.php.net to get a copy of this message | ||
<?php
$message = 'The quick brown fox jumped over the lazy dog.';
# Generate keypair
$keyPair = sodium_crypto_sign_keypair();
# Sign a message
$secKey = sodium_crypto_sign_secretkey($keyPair);
$signature = sodium_crypto_sign_detached($message, $secKey);
# Verify a message
$pubKey = sodium_crypto_sign_publickey($keyPair);
$verifyResult = sodium_crypto_sign_verify_detached($signature, $message, $pubKey);
var_dump($verifyResult); # true or false
?>
----
Server IP: 45.112.84.4
Probable Submitter: 185.85.3.195 (proxied: 109.63.182.124)
----
Manual Page -- http://php.net/manual/en/function.sodium-crypto-sign-verify-detached.php
Edit -- https://master.php.net/note/edit/125005
Del: integrated -- https://master.php.net/note/delete/125005/integrated
Del: useless -- https://master.php.net/note/delete/125005/useless
Del: bad code -- https://master.php.net/note/delete/125005/bad+code
Del: spam -- https://master.php.net/note/delete/125005/spam
Del: non-english -- https://master.php.net/note/delete/125005/non-english
Del: in docs -- https://master.php.net/note/delete/125005/in+docs
Del: other reasons-- https://master.php.net/note/delete/125005
Reject -- https://master.php.net/note/reject/125005
Search -- https://master.php.net/manage/user-notes.php