MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / Increment

Function Increment

src/cryptlib/integer.cpp:186–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186static word Increment(word *A, unsigned int N, word B=1)
187{
188 assert(N);
189 word t = A[0];
190 A[0] = t+B;
191 if (A[0] >= t)
192 return 0;
193 for (unsigned i=1; i<N; i++)
194 if (++A[i])
195 return 0;
196 return 1;
197}
198
199static word Decrement(word *A, unsigned int N, word B=1)
200{

Callers 7

RecursiveMultiplyFunction · 0.85
RecursiveSquareFunction · 0.85
RecursiveMultiplyTopFunction · 0.85
AsymmetricMultiplyFunction · 0.85
HalfMontgomeryReduceFunction · 0.85
integer.cppFile · 0.85
PositiveAddFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected