Update CMakeLists.txt - play with openssl
[novacoin.git] / src / random.h
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2014 The Bitcoin developers
3 // Distributed under the MIT/X11 software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
6 #ifndef BITCOIN_RANDOM_H
7 #define BITCOIN_RANDOM_H
8
9 #include <cstdint>
10
11 class uint256;
12
13 /**
14  * Seed OpenSSL PRNG with additional entropy data
15  */
16 void RandAddSeed();
17 void RandAddSeedPerfmon();
18
19 /**
20  * Functions to gather random data via the OpenSSL PRNG
21  */
22 void GetRandBytes(unsigned char *buf, int num);
23 uint64_t GetRand(uint64_t nMax);
24 int GetRandInt(int nMax);
25 uint256 GetRandHash();
26
27 #endif // BITCOIN_RANDOM_H