MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / rand256

Method rand256

src/random.cpp:387–396  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

385}
386
387uint256 FastRandomContext::rand256()
388{
389 if (bytebuf_size < 32) {
390 FillByteBuffer();
391 }
392 uint256 ret;
393 memcpy(ret.begin(), bytebuf + 64 - bytebuf_size, 32);
394 bytebuf_size -= 32;
395 return ret;
396}
397
398std::vector<unsigned char> FastRandomContext::randbytes(size_t len)
399{

Callers 3

BOOST_AUTO_TEST_CASEFunction · 0.80
InsecureRand256Function · 0.80
MerkleRootFunction · 0.80

Calls 2

memcpyFunction · 0.85
beginMethod · 0.45

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.64
InsecureRand256Function · 0.64