WordPress at Your Fingertips
function is not described

ParagonIE_Sodium_Core_Ed25519::scalar_random() public WP 1.0

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

No Hooks.

Return

String.

Usage

$result = ParagonIE_Sodium_Core_Ed25519::scalar_random();

Code of ParagonIE_Sodium_Core_Ed25519::scalar_random() WP 5.8.2

public static function scalar_random()
{
    do {
        $r = 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;
}