52 static char randPool[RANDPOOLSZ];
53 static long randCount = 0;
90 MD5Update(&md5, (u_char *)randPool,
sizeof(randPool));
92 MD5Update(&md5, (u_char *)randData, randLen);
100 MD5Update(&md5, (u_char *)&sysData,
sizeof(sysData));
132 MD5Update(&md5, (u_char *)randPool,
sizeof(randPool));
133 MD5Update(&md5, (u_char *)&randCount,
sizeof(randCount));
150 avGenRand((
char *)&newRand,
sizeof(newRand));
160 static int avRandomized = 0;
161 static u32_t avRandomSeed = 0;
186 u32_t *lptr1 = (
u32_t *)((
char *)&clockBuf[3]);
199 avRandomSeed += *(
u32_t *)clockBuf + *lptr1 + OSIdleCtr
200 + ppp_mtime() + ((
u32_t)TM1 << 16) + TM1;
206 srand((
unsigned)avRandomSeed);
219 static u32_t last_jiffies;
244 return ((((
u32_t)rand() << 16) + rand()) + avRandomSeed);