CHG: 'hf mf fchk' - speed improvments by tweaking implementation.
CHG: 'hf mf fchk' - can use dictionary from flashmem if one is uploaded. (faster)
This commit is contained in:
@@ -138,13 +138,13 @@ int mfCheckKeys(uint8_t blockNo, uint8_t keyType, bool clear_trace, uint8_t keyc
|
||||
// 1 ==
|
||||
// 2 == Time-out, aborting
|
||||
int mfCheckKeys_fast( uint8_t sectorsCnt, uint8_t firstChunk, uint8_t lastChunk, uint8_t strategy,
|
||||
uint32_t size, uint8_t *keyBlock, sector_t *e_sector) {
|
||||
uint32_t size, uint8_t *keyBlock, sector_t *e_sector, bool use_flashmemory) {
|
||||
|
||||
uint64_t t2 = msclock();
|
||||
uint32_t timeout = 0;
|
||||
|
||||
// send keychunk
|
||||
UsbCommand c = {CMD_MIFARE_CHKKEYS_FAST, { (sectorsCnt | (firstChunk << 8) | (lastChunk << 12) ), strategy, size}};
|
||||
UsbCommand c = {CMD_MIFARE_CHKKEYS_FAST, { (sectorsCnt | (firstChunk << 8) | (lastChunk << 12) ), ((use_flashmemory << 8) | strategy), size}};
|
||||
memcpy(c.d.asBytes, keyBlock, 6 * size);
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
|
||||
Reference in New Issue
Block a user