Lines Matching refs:algo
91 static inline uint32_t rand_range32(const php_random_algo *algo, php_random_status *status, uint32_… in rand_range32() argument
100 uint32_t r = algo->generate(status); in rand_range32()
135 uint32_t r = algo->generate(status); in rand_range32()
147 static inline uint64_t rand_range64(const php_random_algo *algo, php_random_status *status, uint64_… in rand_range64() argument
156 uint64_t r = algo->generate(status); in rand_range64()
191 uint64_t r = algo->generate(status); in rand_range64()
245 PHPAPI php_random_status *php_random_status_alloc(const php_random_algo *algo, const bool persisten… in php_random_status_alloc() argument
249 status->last_generated_size = algo->generate_size; in php_random_status_alloc()
250 status->state = algo->state_size > 0 ? pecalloc(1, algo->state_size, persistent) : NULL; in php_random_status_alloc()
255 PHPAPI php_random_status *php_random_status_copy(const php_random_algo *algo, php_random_status *ol… in php_random_status_copy() argument
258 new_status->state = memcpy(new_status->state, old_status->state, algo->state_size); in php_random_status_copy()
271 …gine_common_init(zend_class_entry *ce, zend_object_handlers *handlers, const php_random_algo *algo) in php_random_engine_common_init() argument
278 engine->algo = algo; in php_random_engine_common_init()
279 engine->status = php_random_status_alloc(engine->algo, false); in php_random_engine_common_init()
301 new_engine->algo = old_engine->algo; in php_random_engine_common_clone_object()
303 …new_engine->status = php_random_status_copy(old_engine->algo, old_engine->status, new_engine->stat… in php_random_engine_common_clone_object()
312 PHPAPI zend_long php_random_range(const php_random_algo *algo, php_random_status *status, zend_long… in php_random_range() argument
317 return (zend_long) (rand_range64(algo, status, umax) + min); in php_random_range()
320 return (zend_long) (rand_range32(algo, status, umax) + min); in php_random_range()