24 #include <boost/algorithm/string.hpp> 35 return h128(boost::replace_all_copy(_uuid,
"-",
""));
45 std::string ret =
toHex(_uuid.
ref());
46 for (
unsigned i: {20, 16, 12, 8})
47 ret.insert(ret.begin() + i,
'-');
h128 fromUUID(std::string const &_uuid)
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
std::string toHex(T const &_data, int _w=2, HexPrefix _prefix=HexPrefix::DontAdd)
std::hash for asio::adress
boost::random_device s_fixedHashEngine
Fixed-size raw-byte array container type, with an API optimised for storing hashes.
std::string toUUID(h128 const &_uuid)