【Blockchain】Bitcoinのrandom.hを見てみる

os random, hardware random, random byte, random hashあたりは使っていきたい。

https://github.com/bitcoin/bitcoin/blob/master/src/random.cpp
https://github.com/bitcoin/bitcoin/blob/master/src/random.h
//
GetRandBytes, GetRandHash, GetRandDur

GetStrongRandBytes()
RandAddPeriodic()

void RandomInit();
void RandAddPeriodic() noexcept;
void RandAddEvent(const uint32_t event_info) noexcept;

void GetRandBytes(Span bytes) noexcept;
void GetStrongRandBytes(Span bytes) noexcept;

class RandomMixin
class InsecureRandomContext

inline uint256 GetRandHash() noexcept

void InitHardwareRand()
void ReportHardwareRand()
uint64_t GetRdRand() noexcept
uint64_t GetRdSeed() noexcept

void InitHardwareRand()
void ReportHardwareRand()
uint64_t GetRNDR() noexcept
uint64_t GetRNDRRS() noexcept
void GetOSRand(unsigned char *ent32)
RNGState& GetRNGState() noexcept