We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1973b99 commit 378600cCopy full SHA for 378600c
1 file changed
ddsenabler_participants/src/cpp/RpcUtils.cpp
@@ -18,6 +18,8 @@
18
19
#include <ddsenabler_participants/rpc/RpcUtils.hpp>
20
21
+#include <cpp_utils/math/random/RandomManager.hpp>
22
+
23
#include <nlohmann/json.hpp>
24
#include <fstream>
25
#include <random>
@@ -31,13 +33,11 @@ namespace RpcUtils {
31
33
UUID generate_UUID()
32
34
{
35
UUID uuid;
- std::random_device rd;
- std::mt19937 gen(rd());
36
- std::uniform_int_distribution<unsigned int> dis(0, 255);
+ utils::RandomManager rm;
37
38
for (size_t i = 0; i < sizeof(uuid); ++i)
39
40
- uuid[i] = static_cast<uint8_t>(dis(gen));
+ uuid[i] = static_cast<uint8_t>(rm.pure_rand());
41
}
42
return uuid;
43
0 commit comments