sodium_crypto_core_ristretto255_scalar_add

(PHP 8 >= 8.1.0)

sodium_crypto_core_ristretto255_scalar_addスカラー値を追加する

説明

sodium_crypto_core_ristretto255_scalar_add(string $x, string $y): string

要素 yx に追加します。 libsodium 1.0.18 以降で利用可能です。

警告

この関数は、 現在のところ詳細な情報はありません。引数のリストのみが 記述されています。

パラメータ

x

スカラー値。 X座標を表します。

y

スカラー値。 Y座標を表します。

戻り値

32バイト長のランダムな文字列を返します。

例1 sodium_crypto_core_ristretto255_scalar_add() の例

<?php

$foo
= sodium_crypto_core_ristretto255_scalar_random();
$bar = sodium_crypto_core_ristretto255_scalar_random();

$value = sodium_crypto_core_ristretto255_scalar_add($foo, $bar);
$value = sodium_crypto_core_ristretto255_scalar_sub($value, $bar);

var_dump(hash_equals($foo, $value));
?>

上の例の出力は以下となります。

bool(true)

参考

add a note add a note

User Contributed Notes

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