Searched refs:urandom (Results 1 – 2 of 2) sorted by relevance
29 static FILE* urandom = NULL; variable33 if (urandom) in cleanup()34 fclose(urandom); in cleanup()39 if (!urandom) { in rand_bytes()40 urandom = fopen("/dev/urandom", "rb"); in rand_bytes()41 if (!urandom) { in rand_bytes()50 if (len != fread(dst, 1, len, urandom)) { in rand_bytes()
28 static FILE* urandom = NULL; variable89 if (!urandom) { in rand32_no_zero_bytes()90 urandom = fopen("/dev/urandom", "rb"); in rand32_no_zero_bytes()91 if (!urandom) { in rand32_no_zero_bytes()99 if (!fread(&byte, 1, 1, urandom)) { in rand32_no_zero_bytes()113 if (urandom) in cleanup()114 fclose(urandom); in cleanup()