randombytes_random() is 32 bits, even in JS.

This commit is contained in:
Frank Denis
2015-01-18 09:50:17 +01:00
parent dd5224791b
commit add0fcede4
2 changed files with 4 additions and 3 deletions
+1
View File
@@ -35,6 +35,7 @@ static int randombytes_tests(void)
assert(strcmp(randombytes_implementation_name(), "js"));
#endif
randombytes(x, 1U);
while (randombytes_random() <= (uint32_t) 0x7fffffff);
randombytes_close();
for (i = 0; i < 256; ++i) {