MCPcopy Create free account
hub / github.com/Endermanch/XPKeygen / AddCheckDigit

Function AddCheckDigit

pidgen/util.cpp:56–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54
55
56DWORD AddCheckDigit(DWORD dw)
57{
58 // add a valid check digit to the sequence number
59
60 DWORD dwSum = 0;
61 DWORD dwCheckNum = dw;
62
63 while (dwCheckNum != 0)
64 {
65 dwSum += dwCheckNum%10;
66 dwCheckNum /= 10;
67 }
68
69 dw = 10 * dw + 7 - dwSum%7;
70
71 return dw;
72}
73
74char * StrUpperA(char *pstr)
75{

Callers 1

STDAPICALLTYPE PIDGenRcFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected