ParagonIE_Sodium_Core_Ed25519::scalar_random() –

You appear to be a bot. Output may be restricted

Description

Usage

$string = ParagonIE_Sodium_Core_Ed25519::scalar_random();

Parameters

Returns

string

Source

File name: wordpress/wp-includes/sodium_compat/src/Core/Ed25519.php


Lines:

1 to 13 of 13
    public static function scalar_random()
    {
        do {
            $r = ParagonIE_Sodium_Compat::ParagonIE_Sodium_Compat::randombytes_buf(self::SCALAR_BYTES);
            $r[self::SCALAR_BYTES - 1] = self::intToChr(
                self::chrToInt($r[self::SCALAR_BYTES - 1]) & 0x1f
            );
        } while (
            !self::check_S_lt_L($r) || ParagonIE_Sodium_Compat::is_zero($r)
        );
        return $r;
    }
 

 View on GitHub View on Trac