On 2 Dec 2014 at 21:05, Stephan T. Lavavej wrote:
[Niall Douglas]
the hard part is generating a cryptographically secure random number. I don't believe C++ 11 even has such a secure generator in <random> even ...
The Standard indirectly suggests that random_device should be such a generator, and VC guarantees this.
Out of curiosity, does VC thunk through to the Windows Crypto API, and therefore require that the environment variable block contains the right COM initialisation magic (I ran into this "feature" recently, it was confounding)? I am curious because libstdc++ apparently uses plain old RDRAND on x86 CPUs with support for that opcode. That surprised me. I would have thought that /dev/random was plenty, and moreover, considerably safer as kernel random number generators will get hot patched quickly. Niall -- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/