- // Read keys A from file\r
- for (sectorNo=0; sectorNo<numSectors; sectorNo++) {\r
- size_t bytes_read = fread(keyA[sectorNo], 1, 6, fin);\r
- if (bytes_read != 6) {\r
- PrintAndLog("File reading error.");\r
- fclose(fin);\r
- return 2;\r
- }\r
- }\r
-\r
- // Read keys B from file\r
- for (sectorNo=0; sectorNo<numSectors; sectorNo++) {\r
- size_t bytes_read = fread(keyB[sectorNo], 1, 6, fin);\r
- if (bytes_read != 6) {\r
- PrintAndLog("File reading error.");\r
- fclose(fin);\r
- return 2;\r
- }\r
+ // Read keys from file\r
+ for (int group=0; group<=1; group++) {\r
+ for (sectorNo=0; sectorNo<numSectors; sectorNo++) {\r
+ size_t bytes_read = fread(keys[group][sectorNo], 1, 6, fin);\r
+ if (bytes_read != 6) {\r
+ PrintAndLog("File reading error.");\r
+ fclose(fin);\r
+ return 2;\r
+ }\r
+ } \r