You are here

public static function ParagonIE_Sodium_Compat::randombytes_random16 in Automatic Updates 7

Same name and namespace in other branches
  1. 8 vendor/paragonie/sodium_compat/src/Compat.php \ParagonIE_Sodium_Compat::randombytes_random16()

Generate a random 16-bit integer.

Return value

int

Throws

Exception

Error

TypeError

2 calls to ParagonIE_Sodium_Compat::randombytes_random16()
php72compat.php in vendor/paragonie/sodium_compat/lib/php72compat.php
sodium_compat.php in vendor/paragonie/sodium_compat/lib/sodium_compat.php

File

vendor/paragonie/sodium_compat/src/Compat.php, line 3446

Class

ParagonIE_Sodium_Compat

Code

public static function randombytes_random16() {
  if (self::use_fallback('randombytes_random16')) {
    return (int) call_user_func('\\Sodium\\randombytes_random16');
  }
  return random_int(0, 65535);
}