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

Function Decrement

src/cryptlib/integer.cpp:199–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199static word Decrement(word *A, unsigned int N, word B=1)
200{
201 assert(N);
202 word t = A[0];
203 A[0] = t-B;
204 if (A[0] <= t)
205 return 0;
206 for (unsigned i=1; i<N; i++)
207 if (A[i]--)
208 return 0;
209 return 1;
210}
211
212static void TwosComplement(word *A, unsigned int N)
213{

Callers 5

TwosComplementFunction · 0.85
HalfMontgomeryReduceFunction · 0.85
integer.cppFile · 0.85
PositiveSubtractFunction · 0.85
InverseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected