RNG API

Get a random number

Function uint64_t database::get_random_bits(uint64_t bound) 

bound: The upper limit for the random number.

TypeDefs

peerplays/libraries/chain/include/graphene/chain/protocol/types.hpp
typedef fc::ripemd160 secret_hash_type;


peerplays/libraries/fc/include/fc/crypto/hash_ctr_rng.hpp
template<class HashClass, int SeedLength>

class hash_ctr_rng
{...}

Declaration

peerplays/libraries/chain/include/graphene/chain/database.hpp 

fc::hash_ctr_rng<secret_hash_type, 20> _random_number_generator;

Examples

Initialization in constructor

Updating seed on a new block

Getting a new random number

Last updated