WordPress at Your Fingertips
function is not described

ParagonIE_Sodium_Core_Ristretto255::ristretto255_scalar_from_string() public WP 1.0

{} It's a method of the class: ParagonIE_Sodium_Core_Ristretto255{}

No Hooks.

Return

String.

Usage

$result = ParagonIE_Sodium_Core_Ristretto255::ristretto255_scalar_from_string( $ctx, $msg, $hash_alg );
$ctx(string) (required)
-
$msg(string) (required)
-
$hash_alg(int) (required)
-

Code of ParagonIE_Sodium_Core_Ristretto255::ristretto255_scalar_from_string() WP 5.8.2

public static function ristretto255_scalar_from_string($ctx, $msg, $hash_alg)
{
    $h = array_fill(0, 64, 0);
    $h_be = self::stringToIntArray(
        self::h2c_string_to_hash(
            self::HASH_SC_L, $ctx, $msg, $hash_alg
        )
    );

    for ($i = 0; $i < self::HASH_SC_L; ++$i) {
        $h[$i] = $h_be[self::HASH_SC_L - 1 - $i];
    }
    return self::ristretto255_scalar_reduce(self::intArrayToString($h));
}