sodium_crypto_core_ristretto255_scalar_negate

(PHP 8 >= 8.1.0)

sodium_crypto_core_ristretto255_scalar_negateスカラー値の論理否定を行う

説明

sodium_crypto_core_ristretto255_scalar_negate(string $s): string

スカラー値の論理否定演算を行います。 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)

参考

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top