1 #include <openssl/rand.h> 2 3 namespace crypto 4 { 5 6 struct prng 7 { 8 static unsigned int rand() 9 { 10 unsigned int v; 11 RAND_bytes(reinterpret_cast<unsigned char*>(&v), sizeof(v)); 12 return v; 13 } 14 }; 15 16 } // namespace crypto 17