Changeset View
Changeset View
Standalone View
Standalone View
src/random.cpp
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include "random.h" | #include "random.h" | ||||
#include "crypto/sha512.h" | #include "crypto/sha512.h" | ||||
#include "support/cleanse.h" | #include "support/cleanse.h" | ||||
#ifdef WIN32 | #ifdef WIN32 | ||||
#include "compat.h" // for Windows API | #include "compat.h" // for Windows API | ||||
#include <wincrypt.h> | #include <wincrypt.h> | ||||
#endif | #endif | ||||
#include "logging.h" // for LogPrint() | |||||
#include "sync.h" // for WAIT_LOCK | #include "sync.h" // for WAIT_LOCK | ||||
#include "util.h" // for LogPrint() | #include "utiltime.h" // for GetTime() | ||||
#include "utilstrencodings.h" // for GetTime() | |||||
#include <chrono> | #include <chrono> | ||||
#include <cstdlib> | #include <cstdlib> | ||||
#include <limits> | #include <limits> | ||||
#include <thread> | #include <thread> | ||||
#ifndef WIN32 | #ifndef WIN32 | ||||
#include <fcntl.h> | |||||
#include <sys/time.h> | #include <sys/time.h> | ||||
#endif | #endif | ||||
#ifdef HAVE_SYS_GETRANDOM | #ifdef HAVE_SYS_GETRANDOM | ||||
#include <linux/random.h> | #include <linux/random.h> | ||||
#include <sys/syscall.h> | #include <sys/syscall.h> | ||||
#endif | #endif | ||||
#if defined(HAVE_GETENTROPY) || \ | #if defined(HAVE_GETENTROPY) || \ | ||||
▲ Show 20 Lines • Show All 452 Lines • Show Last 20 Lines |