-\r
- for (i = 0; i < 16; i++) {\r
- PrintAndLog("count=%d key= %s", i, sprint_hex(keyBlock + i * 6, 6));\r
- }\r
- \r
- // test keys\r
- res = mfCheckKeys(trgBlockNo, trgKeyType, 8, keyBlock, &key64);\r
- if (res)\r
- res = mfCheckKeys(trgBlockNo, trgKeyType, 8, &keyBlock[6 * 8], &key64);\r
- if (!res) {\r
- PrintAndLog("Found valid key:%012I64x", key64);\r
+ key64 = bytes_to_num(keyBlock, 6);\r
+ if (key64) {\r
+ PrintAndLog("Found valid key:%012"llx, key64);\r