sodium_crypto_core_ristretto255_scalar_negate

(PHP 8 >= 8.1.0)

sodium_crypto_core_ristretto255_scalar_negateNegates a scalar value

說明

sodium_crypto_core_ristretto255_scalar_negate(string $s): string

Negates a scalar value. Available as of libsodium 1.0.18.

警告

本函數(shù)還未編寫文檔,僅有參數(shù)列表。

參數(shù)

s

Scalar value.

返回值

Returns a 32-byte random string.

范例

示例 #1 sodium_crypto_core_ristretto255_scalar_negate() example

<?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) 

參見