diff options
author | chriseth <chris@ethereum.org> | 2016-08-08 21:11:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-08 21:11:36 +0800 |
commit | c3ed550eb6040596681107560d682f102c458de7 (patch) | |
tree | be5a7f120bef5073754171df4167f334c8fce7c3 /libdevcore/FixedHash.h | |
parent | 53a5e99c1341bb868f3d7cf5a07675872b941ce8 (diff) | |
parent | ccd78d05d6221b5eb47514b30f7e5c5aa7169365 (diff) | |
download | dexon-solidity-c3ed550eb6040596681107560d682f102c458de7.tar dexon-solidity-c3ed550eb6040596681107560d682f102c458de7.tar.gz dexon-solidity-c3ed550eb6040596681107560d682f102c458de7.tar.bz2 dexon-solidity-c3ed550eb6040596681107560d682f102c458de7.tar.lz dexon-solidity-c3ed550eb6040596681107560d682f102c458de7.tar.xz dexon-solidity-c3ed550eb6040596681107560d682f102c458de7.tar.zst dexon-solidity-c3ed550eb6040596681107560d682f102c458de7.zip |
Merge pull request #834 from chriseth/devcorecleanup
Some cleanup regarding libdevcore. Also rename to avoid conflicts.
Diffstat (limited to 'libdevcore/FixedHash.h')
-rw-r--r-- | libdevcore/FixedHash.h | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/libdevcore/FixedHash.h b/libdevcore/FixedHash.h index cf79bab0..a23aecc6 100644 --- a/libdevcore/FixedHash.h +++ b/libdevcore/FixedHash.h @@ -26,8 +26,6 @@ #include <array> #include <cstdint> #include <algorithm> -#include <boost/random/random_device.hpp> -#include <boost/random/uniform_int_distribution.hpp> #include <boost/functional/hash.hpp> #include "CommonData.h" @@ -38,8 +36,6 @@ namespace dev template <unsigned N> struct StaticLog2 { enum { result = 1 + StaticLog2<N/2>::result }; }; template <> struct StaticLog2<1> { enum { result = 0 }; }; -extern boost::random_device s_fixedHashEngine; - /// Fixed-size raw-byte array container type, with an API optimised for storing hashes. /// Transparently converts to/from the corresponding arithmetic type; this will /// assume the data contained in the hash is big-endian. @@ -150,17 +146,6 @@ public: /// @returns a constant reference to the object's data as an STL array. std::array<byte, N> const& asArray() const { return m_data; } - /// Populate with random data. - template <class Engine> - void randomize(Engine& _eng) - { - for (auto& i: m_data) - i = (uint8_t)boost::random::uniform_int_distribution<uint16_t>(0, 255)(_eng); - } - - /// @returns a random valued object. - static FixedHash random() { FixedHash ret; ret.randomize(s_fixedHashEngine); return ret; } - struct hash { /// Make a hash of the object's data. @@ -279,10 +264,6 @@ inline h160 left160(h256 const& _t) return ret; } -h128 fromUUID(std::string const& _uuid); - -std::string toUUID(h128 const& _uuid); - inline std::string toString(h256s const& _bs) { std::ostringstream out; |