MCPcopy Create free account
hub / github.com/ElementsProject/elements / rand64

Method rand64

src/random.h:175–181  ·  view source on GitHub ↗

Generate a random 64-bit integer. */

Source from the content-addressed store, hash-verified

173
174 /** Generate a random 64-bit integer. */
175 uint64_t rand64() noexcept
176 {
177 if (bytebuf_size < 8) FillByteBuffer();
178 uint64_t ret = ReadLE64(bytebuf + 64 - bytebuf_size);
179 bytebuf_size -= 8;
180 return ret;
181 }
182
183 /** Generate a random (bits)-bit integer. */
184 uint64_t randbits(int bits) noexcept

Callers 3

BOOST_AUTO_TEST_CASEFunction · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80
FUZZ_TARGETFunction · 0.80

Calls 1

ReadLE64Function · 0.85

Tested by 3

BOOST_AUTO_TEST_CASEFunction · 0.64
BOOST_AUTO_TEST_CASEFunction · 0.64
FUZZ_TARGETFunction · 0.64