PHP 8.5.0 Alpha 2 available for testing

sodium_crypto_core_ristretto255_scalar_negate

(PHP 8 >= 8.1.0)

sodium_crypto_core_ristretto255_scalar_negateInvierte el signo de un valor escalar

Descripción

sodium_crypto_core_ristretto255_scalar_negate(string $s): string

Invierte el signo de un valor escalar. Disponible a partir de libsodium 1.0.18.

Advertencia

Esta función está actualmente no documentada; solo la lista de sus argumentos está disponible.

Parámetros

s

Valor escalar.

Valores devueltos

Devuelve una string aleatoria de 32 bytes.

Ejemplos

Ejemplo #1 Ejemplo de 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));
?>

El ejemplo anterior mostrará :

bool(true)

Ver también

add a note

User Contributed Notes

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