10Duke Scale C++ Client
Loading...
Searching...
No Matches
InsecureRandomBytes.h
1#ifndef TENDUKE_UTL_RANDOM_INSECURERANDOMBYTES_H
2#define TENDUKE_UTL_RANDOM_INSECURERANDOMBYTES_H
3
4#include "./RandomBytes.h"
5#include <random>
6
7
8namespace tenduke { namespace utl { namespace random {
9
10
15{
16public:
21
22
23 // tenduke::utl:random::RandomBytes interface
24public:
30 void generate(unsigned char *buffer, size_t bufferLength) override;
31
32private:
33 std::random_device device;
34 std::mt19937 generator;
35 std::uniform_int_distribution<std::mt19937::result_type> distribution;
36};
37
38
39}}}
40
41
42#endif // TENDUKE_UTL_RANDOM_INSECURERANDOMBYTES_H
Default implementation of tenduke::utl::random::RandomBytes.
Definition InsecureRandomBytes.h:15
InsecureRandomBytes()
Constructs new instance.
Definition InsecureRandomBytes.cpp:5
void generate(unsigned char *buffer, size_t bufferLength) override
Fills the given buffer with insecurely generated random bytes.
Definition InsecureRandomBytes.cpp:12
Generates random bytes.
Definition RandomBytes.h:13
Utilities.
Definition Base64Decoder.h:10
Root for classes, functions and globals of 10Duke C++ Client.
Definition BackendConfiguration.h:7