Skip to content

Commit 378600c

Browse files
Random from dev utils
Signed-off-by: Eugenio Collado <eugeniocollado@eprosima.com>
1 parent 1973b99 commit 378600c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

ddsenabler_participants/src/cpp/RpcUtils.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
#include <ddsenabler_participants/rpc/RpcUtils.hpp>
2020

21+
#include <cpp_utils/math/random/RandomManager.hpp>
22+
2123
#include <nlohmann/json.hpp>
2224
#include <fstream>
2325
#include <random>
@@ -31,13 +33,11 @@ namespace RpcUtils {
3133
UUID generate_UUID()
3234
{
3335
UUID uuid;
34-
std::random_device rd;
35-
std::mt19937 gen(rd());
36-
std::uniform_int_distribution<unsigned int> dis(0, 255);
36+
utils::RandomManager rm;
3737

3838
for (size_t i = 0; i < sizeof(uuid); ++i)
3939
{
40-
uuid[i] = static_cast<uint8_t>(dis(gen));
40+
uuid[i] = static_cast<uint8_t>(rm.pure_rand());
4141
}
4242
return uuid;
4343
}

0 commit comments

Comments
 (0)