Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/src/tests.c
Show First 20 Lines • Show All 5,181 Lines • ▼ Show 20 Lines | int main(int argc, char **argv) { | ||||
} | } | ||||
/* find random seed */ | /* find random seed */ | ||||
if (argc > 2) { | if (argc > 2) { | ||||
int pos = 0; | int pos = 0; | ||||
const char* ch = argv[2]; | const char* ch = argv[2]; | ||||
while (pos < 16 && ch[0] != 0 && ch[1] != 0) { | while (pos < 16 && ch[0] != 0 && ch[1] != 0) { | ||||
unsigned short sh; | unsigned short sh; | ||||
if (sscanf(ch, "%2hx", &sh)) { | if ((sscanf(ch, "%2hx", &sh)) == 1) { | ||||
seed16[pos] = sh; | seed16[pos] = sh; | ||||
} else { | } else { | ||||
break; | break; | ||||
} | } | ||||
ch += 2; | ch += 2; | ||||
pos++; | pos++; | ||||
} | } | ||||
} else { | } else { | ||||
▲ Show 20 Lines • Show All 119 Lines • Show Last 20 Lines |