Lines Matching refs:size
91 PHPAPI int php_random_bytes(void *bytes, size_t size, bool should_throw) in php_random_bytes() argument
95 if (php_win32_get_random_bytes(bytes, size) == FAILURE) { in php_random_bytes()
108 if (CCRandomGenerateBytes(bytes, size) != kCCSuccess) { in php_random_bytes()
115 arc4random_buf(bytes, size); in php_random_bytes()
122 while (read_bytes < size) { in php_random_bytes()
132 size_t amount_to_read = size - read_bytes; in php_random_bytes()
162 if (read_bytes < size) { in php_random_bytes()
193 for (read_bytes = 0; read_bytes < size; read_bytes += (size_t) n) { in php_random_bytes()
194 n = read(fd, bytes + read_bytes, size - read_bytes); in php_random_bytes()
200 if (read_bytes < size) { in php_random_bytes()
216 zend_long size; in PHP_FUNCTION() local
220 Z_PARAM_LONG(size) in PHP_FUNCTION()
223 if (size < 1) { in PHP_FUNCTION()
228 bytes = zend_string_alloc(size, 0); in PHP_FUNCTION()
230 if (php_random_bytes_throw(ZSTR_VAL(bytes), size) == FAILURE) { in PHP_FUNCTION()
235 ZSTR_VAL(bytes)[size] = '\0'; in PHP_FUNCTION()