diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ossl_random.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ossl_random.cpp b/src/ossl_random.cpp new file mode 100644 index 0000000000..f196a8b5a3 --- /dev/null +++ b/src/ossl_random.cpp @@ -0,0 +1,12 @@ +#include "ossl_random.hpp" + +#include <boost/uuid/uuid_generators.hpp> +#include <boost/uuid/uuid_io.hpp> + +std::string bmcweb::getRandomUUID() +{ + using bmcweb::OpenSSLGenerator; + OpenSSLGenerator ossl; + return boost::uuids::to_string( + boost::uuids::basic_random_generator<OpenSSLGenerator>(ossl)()); +} |