| 36 | #define RANDOM_POOL_SIZE (32*1024) |
| 37 | |
| 38 | class RandomBytes { |
| 39 | private: |
| 40 | mutex m_mutex; |
| 41 | BYTE* m_randbuf; |
| 42 | DWORD m_bufpos; |
| 43 | |
| 44 | void lock() { m_mutex.lock(); } |
| 45 | void unlock() { m_mutex.unlock(); } |
| 46 | public: |
| 47 | bool GetRandomBytes(unsigned char *buf, DWORD len); |
| 48 | RandomBytes(); |
| 49 | // disallow copying |
| 50 | RandomBytes(RandomBytes const&) = delete; |
| 51 | void operator=(RandomBytes const&) = delete; |
| 52 | |
| 53 | virtual ~RandomBytes(); |
| 54 | }; |
| 55 |
nothing calls this directly
no outgoing calls
no test coverage detected