Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
35 lines (27 loc) · 588 Bytes

File metadata and controls

35 lines (27 loc) · 588 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Aleth: Ethereum C++ client, tools and libraries.
// Copyright 2014-2019 Aleth Authors.
// Licensed under the GNU General Public License, Version 3.
#include "FixedHash.h"
#include <boost/algorithm/string.hpp>
namespace eth
{
std::random_device s_fixedHashEngine;
h128 fromUUID(std::string const& _uuid)
{
try
{
return h128(boost::replace_all_copy(_uuid, "-", ""));
}
catch (...)
{
return h128();
}
}
std::string toUUID(h128 const& _uuid)
{
std::string ret = toHex(_uuid.ref());
for (unsigned i: {20, 16, 12, 8})
ret.insert(ret.begin() + i, '-');
return ret;
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.