#include <stdlib.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <math.h>
#include "php.h"
#include "Zend/zend_attributes.h"
#include "Zend/zend_enum.h"
#include "Zend/zend_exceptions.h"
#include "php_random.h"
#include "php_random_csprng.h"
#include "ext/standard/sha1.h"
#include <sys/time.h>
#include "random_arginfo.h"
Go to the source code of this file.
|
PHPAPI | ZEND_DECLARE_MODULE_GLOBALS (random) |
|
PHPAPI uint64_t | php_random_range64 (php_random_algo_with_state engine, uint64_t umax) |
|
PHPAPI void * | php_random_status_alloc (const php_random_algo *algo, const bool persistent) |
|
PHPAPI void * | php_random_status_copy (const php_random_algo *algo, void *old_status, void *new_status) |
|
PHPAPI void | php_random_status_free (void *status, const bool persistent) |
|
PHPAPI php_random_engine * | php_random_engine_common_init (zend_class_entry *ce, zend_object_handlers *handlers, const php_random_algo *algo) |
|
PHPAPI void | php_random_engine_common_free_object (zend_object *object) |
|
PHPAPI zend_object * | php_random_engine_common_clone_object (zend_object *object) |
|
PHPAPI zend_long | php_random_range (php_random_algo_with_state engine, zend_long min, zend_long max) |
|
PHPAPI const php_random_algo * | php_random_default_algo (void) |
|
PHPAPI void * | php_random_default_status (void) |
|
| ZEND_SET_ALIGNED (16, static const char hexconvtab[]) |
|
PHPAPI zend_string * | php_random_bin2hex_le (const void *ptr, const size_t len) |
|
PHPAPI bool | php_random_hex2bin_le (zend_string *hexstr, void *dest) |
|
PHPAPI double | php_combined_lcg (void) |
|
PHPAPI void | php_mt_srand (uint32_t seed) |
|
PHPAPI uint32_t | php_mt_rand (void) |
|
PHPAPI zend_long | php_mt_rand_range (zend_long min, zend_long max) |
|
PHPAPI zend_long | php_mt_rand_common (zend_long min, zend_long max) |
|
| PHP_FUNCTION (lcg_value) |
|
| PHP_FUNCTION (mt_srand) |
|
| PHP_FUNCTION (mt_rand) |
|
| PHP_FUNCTION (mt_getrandmax) |
|
| PHP_FUNCTION (rand) |
|
| PHP_FUNCTION (random_bytes) |
|
| PHP_FUNCTION (random_int) |
|
PHPAPI uint64_t | php_random_generate_fallback_seed_ex (php_random_fallback_seed_state *state) |
|
PHPAPI uint64_t | php_random_generate_fallback_seed (void) |
|
| PHP_MINIT_FUNCTION (random) |
|
| PHP_MSHUTDOWN_FUNCTION (random) |
|
| PHP_RINIT_FUNCTION (random) |
|
◆ PHP_COMBINED_LCG_MODMULT
#define PHP_COMBINED_LCG_MODMULT |
( |
| a, |
|
|
| b, |
|
|
| c, |
|
|
| m, |
|
|
| s ) |
Value:q =
s /
a;
s = b * (
s -
a * q) - c * q;
if (
s < 0)
s += m
◆ php_combined_lcg()
◆ PHP_FUNCTION() [1/7]
◆ PHP_FUNCTION() [2/7]
◆ PHP_FUNCTION() [3/7]
◆ PHP_FUNCTION() [4/7]
◆ PHP_FUNCTION() [5/7]
◆ PHP_FUNCTION() [6/7]
◆ PHP_FUNCTION() [7/7]
◆ PHP_MINIT_FUNCTION()
PHP_MINIT_FUNCTION |
( |
random | | ) |
|
◆ PHP_MSHUTDOWN_FUNCTION()
PHP_MSHUTDOWN_FUNCTION |
( |
random | | ) |
|
◆ php_mt_rand()
◆ php_mt_rand_common()
◆ php_mt_rand_range()
◆ php_mt_srand()
◆ php_random_bin2hex_le()
◆ php_random_default_algo()
◆ php_random_default_status()
◆ php_random_engine_common_clone_object()
◆ php_random_engine_common_free_object()
◆ php_random_engine_common_init()
◆ php_random_generate_fallback_seed()
PHPAPI uint64_t php_random_generate_fallback_seed |
( |
void | | ) |
|
◆ php_random_generate_fallback_seed_ex()
◆ php_random_hex2bin_le()
◆ php_random_range()
◆ php_random_range64()
◆ php_random_status_alloc()
◆ php_random_status_copy()
◆ php_random_status_free()
PHPAPI void php_random_status_free |
( |
void * | status, |
|
|
const bool | persistent ) |
◆ PHP_RINIT_FUNCTION()
PHP_RINIT_FUNCTION |
( |
random | | ) |
|
◆ ZEND_DECLARE_MODULE_GLOBALS()
PHPAPI ZEND_DECLARE_MODULE_GLOBALS |
( |
random | | ) |
|
◆ ZEND_SET_ALIGNED()
ZEND_SET_ALIGNED |
( |
16 | , |
|
|
static const char | hexconvtab[] ) |
◆ random_module_entry
Initial value:= {
"random",
ext_functions,
}
#define PHP_MODULE_GLOBALS
#define STANDARD_MODULE_HEADER
#define STANDARD_MODULE_PROPERTIES_EX
Definition at line 816 of file random.c.