MCPcopy Create free account
hub / github.com/bailey27/cppcryptfs / RandomBytes

Class RandomBytes

libcppcryptfs/crypt/randombytes.h:38–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36#define RANDOM_POOL_SIZE (32*1024)
37
38class RandomBytes {
39private:
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(); }
46public:
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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected