blob: 95946f7974c0dfa2ff0c29408eb09ea54a9c1592 [file] [log] [blame]
Vernon Mauery8977d122018-10-24 14:02:16 -07001#include <openssl/rand.h>
2
3namespace crypto
4{
5
6struct 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