Lines Matching refs:bytes
43 unsigned int bytes; member
122 g->pools[n].bytes = g->pools[n].pool_size = 0; in apr_random_init()
206 hash_add(g->key_hash,g->pools[n].pool,g->pools[n].bytes); in rekey()
207 g->pools[n].bytes = 0; in rekey()
227 apr_size_t bytes) in apr_random_add_entropy() argument
232 for (n = 0; n < bytes; ++n) { in apr_random_add_entropy()
238 if (p->pool_size < p->bytes+1) { in apr_random_add_entropy()
239 unsigned char *np = apr_palloc(g->apr_pool,(p->bytes+1)*2); in apr_random_add_entropy()
241 memcpy(np,p->pool,p->bytes); in apr_random_add_entropy()
243 p->pool_size = (p->bytes+1)*2; in apr_random_add_entropy()
245 p->pool[p->bytes++] = entropy[n]; in apr_random_add_entropy()
247 if (p->bytes == g->rehash_size) { in apr_random_add_entropy()
250 for (r = 0; r < p->bytes/2; r+=g->pool_hash->size) in apr_random_add_entropy()
252 p->bytes/=2; in apr_random_add_entropy()
254 assert(p->bytes < g->rehash_size); in apr_random_add_entropy()
257 if (g->pools[0].bytes >= g->reseed_size) in apr_random_add_entropy()
270 apr_size_t bytes) in apr_random_bytes() argument
274 for (n = 0; n < bytes; ) { in apr_random_bytes()
281 l = min(bytes-n,g->random_bytes); in apr_random_bytes()
290 apr_size_t bytes) in apr_random_secure_bytes() argument
294 apr_random_bytes(g,random,bytes); in apr_random_secure_bytes()
300 apr_size_t bytes) in apr_random_insecure_bytes() argument
304 apr_random_bytes(g,random,bytes); in apr_random_insecure_bytes()