FIX: introduced a bug in a loop by uint8_t inside crapto1.c

CHG: textual helptext change in "hf mf nested"
CHG: loop inside "nested". Still not fast enough. I wonder if qsort can be exchanged for radixsort or bucket sort?
This commit is contained in:
iceman1001 2016-02-16 23:46:34 +01:00
commit b882b54314
3 changed files with 39 additions and 41 deletions

View file

@ -593,10 +593,11 @@ int CmdHF14AMfNested(const char *Cmd)
PrintAndLog("t - transfer keys into emulator memory");
PrintAndLog("d - write keys to binary file");
PrintAndLog(" ");
PrintAndLog(" sample1: hf mf nested 1 0 A FFFFFFFFFFFF ");
PrintAndLog(" sample2: hf mf nested 1 0 A FFFFFFFFFFFF t ");
PrintAndLog(" sample3: hf mf nested 1 0 A FFFFFFFFFFFF d ");
PrintAndLog(" sample4: hf mf nested o 0 A FFFFFFFFFFFF 4 A");
PrintAndLog(" samples:");
PrintAndLog(" hf mf nested 1 0 A FFFFFFFFFFFF ");
PrintAndLog(" hf mf nested 1 0 A FFFFFFFFFFFF t ");
PrintAndLog(" hf mf nested 1 0 A FFFFFFFFFFFF d ");
PrintAndLog(" hf mf nested o 0 A FFFFFFFFFFFF 4 A");
return 0;
}
@ -1125,7 +1126,7 @@ int CmdHF14AMfChk(const char *Cmd)
clock_t t1 = clock();
// check keys.
for (trgKeyType = 0; trgKeyType < 2; ++trgKeyType) {
for (trgKeyType = !keyType; trgKeyType < 2; (keyType==2) ? (++trgKeyType) : (trgKeyType=2) ) {
int b = blockNo;
for (int i = 0; i < SectorsCnt; ++i) {