Remove rand compilation message
This commit is contained in:
@@ -149,7 +149,7 @@ static int randombytes_linux_wait_for_entropy(int device)
|
||||
}
|
||||
if (entropy >= bits) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Unreachable: poll() can should only return -1 or 1
|
||||
retcode_error = -1;
|
||||
@@ -236,24 +236,24 @@ static int randombytes_js_randombytes_nodejs(void *buf, size_t n) {
|
||||
int randombytes(void *buf, size_t n)
|
||||
{
|
||||
#if defined(__EMSCRIPTEN__)
|
||||
# pragma message("Using crypto api from NodeJS")
|
||||
//# pragma message("Using crypto api from NodeJS")
|
||||
return randombytes_js_randombytes_nodejs(buf, n);
|
||||
#elif defined(__linux__)
|
||||
# if defined(SYS_getrandom)
|
||||
# pragma message("Using getrandom system call")
|
||||
//# pragma message("Using getrandom system call")
|
||||
/* Use getrandom system call */
|
||||
return randombytes_linux_randombytes_getrandom(buf, n);
|
||||
# else
|
||||
# pragma message("Using /dev/urandom device")
|
||||
//# pragma message("Using /dev/urandom device")
|
||||
/* When we have enough entropy, we can read from /dev/urandom */
|
||||
return randombytes_linux_randombytes_urandom(buf, n);
|
||||
# endif
|
||||
#elif defined(BSD)
|
||||
# pragma message("Using arc4random system call")
|
||||
//# pragma message("Using arc4random system call")
|
||||
/* Use arc4random system call */
|
||||
return randombytes_bsd_randombytes(buf, n);
|
||||
#elif defined(_WIN32)
|
||||
# pragma message("Using Windows cryptographic API")
|
||||
//# pragma message("Using Windows cryptographic API")
|
||||
/* Use windows API */
|
||||
return randombytes_win32_randombytes(buf, n);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user