MCPcopy Create free account
hub / github.com/albertobsd/keyhunt / GetBitLength

Method GetBitLength

secp256k1/Int.cpp:659–670  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

657// ------------------------------------------------
658
659int Int::GetBitLength() {
660
661 Int t(this);
662 if(IsNegative())
663 t.Neg();
664
665 int i=NB32BLOCK-1;
666 while(i>=0 && t.bits[i]==0) i--;
667 if(i<0) return 0;
668 return (32-bitLength(t.bits[i])) + i*32;
669
670}
671
672// ------------------------------------------------
673

Callers 2

ScalarMultiplicationMethod · 0.45
ModExpMethod · 0.45

Calls 2

bitLengthFunction · 0.85
NegMethod · 0.45

Tested by

no test coverage detected