if (i < sizeof(buffer))
if (i < sizeof(buffer)/2)
extract_entropy(buf, nbytes)	register u_int8_t *buf;	int	nbytes;{	struct random_bucket *rs = &random_state;	MD5_CTX tmp;	u_char buffer[16];	add_timer_randomness(nbytes);	if (rs->entropy_count / 8 > nbytes)		rs->entropy_count -= nbytes*8;	else		rs->entropy_count = 0;	while (nbytes) {		register u_char *p = buf;		register int i = sizeof(buffer);		if (i > nbytes) {			i = nbytes;			p = buffer;		}		/* Hash the pool to get the output */		MD5Init(&tmp);		MD5Update(&tmp, (u_int8_t*)rs->pool, sizeof(rs->pool));		MD5Final(p, &tmp);		/*		 * In case the hash function has some recognizable		 * output pattern, we fold it in half.		 */		p[0] ^= p[15];		p[1] ^= p[14];		p[2] ^= p[13];		p[3] ^= p[12];		p[4] ^= p[11];		p[5] ^= p[10];		p[6] ^= p[ 9];		p[7] ^= p[ 8];		/* Modify pool so next hash will produce different results */		add_entropy_words((u_int32_t*)p, sizeof(buffer)/4);		/* Copy data to destination buffer */		if (i < sizeof(buffer))			bcopy(buffer, buf, i);		nbytes -= i;		buf += i;		add_timer_randomness(nbytes);	}	/* Wipe data from memory */	bzero(&tmp, sizeof(tmp));	bzero(&buffer, sizeof(buffer));}