Home
last modified time | relevance | path

Searched refs:urandom (Results 1 – 2 of 2) sorted by relevance

/device/google/contexthub/util/nanoapp_encr/
Dnanoapp_encr.c29 static FILE* urandom = NULL; variable
33 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()
/device/google/contexthub/util/nanoapp_sign/
Dnanoapp_sign.c28 static FILE* urandom = NULL; variable
89 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()