Lines Matching refs:algo
76 PHPAPI uint32_t php_random_range32(const php_random_algo *algo, php_random_status *status, uint32_t… in php_random_range32() argument
85 uint32_t r = algo->generate(status); in php_random_range32()
120 uint32_t r = algo->generate(status); in php_random_range32()
132 PHPAPI uint64_t php_random_range64(const php_random_algo *algo, php_random_status *status, uint64_t… in php_random_range64() argument
141 uint64_t r = algo->generate(status); in php_random_range64()
176 uint64_t r = algo->generate(status); in php_random_range64()
228 PHPAPI php_random_status *php_random_status_alloc(const php_random_algo *algo, const bool persisten… in php_random_status_alloc() argument
232 status->last_generated_size = algo->generate_size; in php_random_status_alloc()
233 status->state = algo->state_size > 0 ? pecalloc(1, algo->state_size, persistent) : NULL; in php_random_status_alloc()
238 PHPAPI php_random_status *php_random_status_copy(const php_random_algo *algo, php_random_status *ol… in php_random_status_copy() argument
241 new_status->state = memcpy(new_status->state, old_status->state, algo->state_size); in php_random_status_copy()
255 …gine_common_init(zend_class_entry *ce, zend_object_handlers *handlers, const php_random_algo *algo) in php_random_engine_common_init() argument
262 engine->algo = algo; in php_random_engine_common_init()
263 engine->status = php_random_status_alloc(engine->algo, false); in php_random_engine_common_init()
282 new_engine->algo = old_engine->algo; in php_random_engine_common_clone_object()
284 …new_engine->status = php_random_status_copy(old_engine->algo, old_engine->status, new_engine->stat… in php_random_engine_common_clone_object()
293 PHPAPI zend_long php_random_range(const php_random_algo *algo, php_random_status *status, zend_long… in php_random_range() argument
298 return (zend_long) (php_random_range64(algo, status, umax) + min); in php_random_range()
301 return (zend_long) (php_random_range32(algo, status, umax) + min); in php_random_range()