MCPcopy Create free account
hub / github.com/bananabr/TimeException / getRandomBytes

Function getRandomBytes

TimeException.cpp:61–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61vector<char> getRandomBytes(size_t size) {
62 random_device rd;
63 uniform_int_distribution<int> dist(0, 255);
64 vector<char> data(size);
65 for (char& d : data)
66 {
67 d = static_cast<char>(dist(rd) & 0xFF);
68 }
69 return data;
70}
71
72map<string, string> argvToMap(int argc, char* argv[])
73{

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected