#ifndef RANDOM_H #define RANDOM_H #include #include #ifdef __linux__ #include #endif #include #include #include #include #if __OpenBSD__ inline int getrandom(void *buf, size_t buflen, unsigned int flags) { arc4random_buf(buf, buflen); return 0; } #endif /* TODO: if the >=C++11 prngr are good enough, use them */ class Random { public: Random(); std::string getRandomHexString(unsigned int bytes) const; std::vector getRandom(unsigned int bytes) const; }; #endif // RANDOM_H