From 602ee47ef41edca8d8e87abda97a2b082345cc1d Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 6 Mar 2015 11:17:26 +0100 Subject: [PATCH] Don't use flawed way of generating random keys. --- libdevcore/FixedHash.cpp | 2 +- libdevcore/FixedHash.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libdevcore/FixedHash.cpp b/libdevcore/FixedHash.cpp index 0369ea854..ae2d77c85 100644 --- a/libdevcore/FixedHash.cpp +++ b/libdevcore/FixedHash.cpp @@ -25,4 +25,4 @@ using namespace std; using namespace dev; -std::mt19937_64 dev::s_fixedHashEngine(time(0)); +std::random_device dev::s_fixedHashEngine; diff --git a/libdevcore/FixedHash.h b/libdevcore/FixedHash.h index b00a80c04..49c6ed2bf 100644 --- a/libdevcore/FixedHash.h +++ b/libdevcore/FixedHash.h @@ -31,7 +31,7 @@ namespace dev { -extern std::mt19937_64 s_fixedHashEngine; +extern std::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