(PHP 8 >= 8.1.0)
sodium_crypto_core_ristretto255_scalar_negate — 取純量值的負值
取純量值的負值。從 libsodium 1.0.18 開始可用。
此函式目前沒有說明文件;僅提供其參數列表。
s
純量值。
返回一個 32 位元組的隨機 字串。
範例 #1 sodium_crypto_core_ristretto255_scalar_negate() 範例
<?php
$foo = sodium_crypto_core_ristretto255_scalar_random();
$negate = sodium_crypto_core_ristretto255_scalar_negate($foo);
$reNegate = sodium_crypto_core_ristretto255_scalar_negate($negate);
var_dump(hash_equals($foo, $reNegate));
?>
以上範例將輸出
bool(true)