The purpose of the token is to permit different sources of randomness.  Seeing 
as how you don't allow anything other than `nacl_secure_random_init`, perhaps 
you should just make the default token be the empty string in the `<random>` 
header.

Checking for an invalid token would just be a simple `!__token.empty()`.

================
Comment at: src/random.cpp:79
@@ +78,3 @@
+    else if (bytes_written != n)
+        __throw_runtime_error("random_device failed obtaining enough bytes");
+    return r;
----------------
This read a little funny to me, maybe:
> random_device failed to obtain enough bytes

http://reviews.llvm.org/D6442



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to