Lines Matching defs:num
158 static void ssleay_rand_seed(const void *buf, int num);
159 static void ssleay_rand_add(const void *buf, int num, double add_entropy);
160 static int ssleay_rand_bytes(unsigned char *buf, int num);
161 static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num);
190 static void ssleay_rand_add(const void *buf, int num, double add)
236 state_index += num;
249 /* state[st_idx], ..., state[(st_idx + num - 1) % STATE_SIZE]
253 md_count[1] += (num / MD_DIGEST_LENGTH) + (num % MD_DIGEST_LENGTH > 0);
258 for (i=0; i<num; i+=MD_DIGEST_LENGTH)
260 j=(num-i);
316 static void ssleay_rand_seed(const void *buf, int num)
318 ssleay_rand_add(buf, num, (double)num);
321 static int ssleay_rand_bytes(unsigned char *buf, int num)
340 for (i=0; i<num; i++)
346 if (num <= 0)
351 num_ceil = (1 + (num-1)/(MD_DIGEST_LENGTH/2)) * (MD_DIGEST_LENGTH/2);
365 * Finally, after we have finished 'num' random bytes for the
403 entropy -= num;
452 while (num > 0)
455 j=(num >= MD_DIGEST_LENGTH/2)?MD_DIGEST_LENGTH/2:num;
456 num-=j;
512 static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num)
517 ret = RAND_bytes(buf, num);