MCPcopy Create free account
hub / github.com/JeanLucPons/VanitySearch / Rand

Method Rand

Int.cpp:770–783  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

768// ------------------------------------------------
769
770void Int::Rand(int nbit) {
771
772 CLEAR();
773
774 uint32_t nb = nbit/32;
775 uint32_t leftBit = nbit%32;
776 uint32_t mask = 1;
777 mask = (mask << leftBit) - 1;
778 uint32_t i=0;
779 for(;i<nb;i++)
780 bits[i]=rndl();
781 bits[i]=rndl()&mask;
782
783}
784
785// ------------------------------------------------
786

Callers 4

IsProbablePrimeMethod · 0.80
CheckMethod · 0.80
getCPUStartingKeyMethod · 0.80
getGPUStartingKeysMethod · 0.80

Calls 3

rndlFunction · 0.85
GetBitLengthMethod · 0.80
DivMethod · 0.80

Tested by

no test coverage detected