array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'function.sodium-crypto-core-ristretto255-scalar-negate.php', 1 => 'sodium_crypto_core_ristretto255_scalar_negate', ), 'up' => array ( 0 => 'ref.sodium.php', 1 => 'Sodium 関数', ), 'prev' => array ( 0 => 'function.sodium-crypto-core-ristretto255-scalar-mul.php', 1 => 'sodium_crypto_core_ristretto255_scalar_mul', ), 'next' => array ( 0 => 'function.sodium-crypto-core-ristretto255-scalar-random.php', 1 => 'sodium_crypto_core_ristretto255_scalar_random', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ja', 'path' => 'reference/sodium/functions/sodium-crypto-core-ristretto255-scalar-negate.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(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)