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

Method SetBase10

secp256k1/Int.cpp:922–935  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

920// ------------------------------------------------
921
922void Int::SetBase10(const char *value) {
923 CLEAR();
924 Int pw((uint64_t)1);
925 Int c;
926 int lgth = (int)strlen(value);
927 for(int i=lgth-1;i>=0;i--) {
928 uint32_t id = (uint32_t)(value[i]-'0');
929 c.Set(&pw);
930 c.Mult(id);
931 Add(&c);
932 pw.Mult(10);
933 }
934
935}
936
937// ------------------------------------------------
938

Callers

nothing calls this directly

Calls 2

SetMethod · 0.45
MultMethod · 0.45

Tested by

no test coverage detected