-// send commands\r
-int mifare_sendcmd_short(struct Crypto1State *pcs, uint8_t crypted, uint8_t cmd, uint8_t data, uint8_t* answer, uint8_t *answer_parity, uint32_t *timing)\r
-{\r
- return mifare_sendcmd_shortex(pcs, crypted, cmd, data, answer, answer_parity, timing);\r
-}\r
-\r
-int mifare_sendcmd_short_special(struct Crypto1State *pcs, uint8_t crypted, uint8_t cmd, uint8_t* data, uint8_t* answer, uint8_t *answer_parity, uint32_t *timing)\r
-{\r
- uint8_t dcmd[8];\r
- dcmd[0] = cmd;\r
- dcmd[1] = data[0];\r
- dcmd[2] = data[1];\r
- dcmd[3] = data[2];\r
- dcmd[4] = data[3];\r
- dcmd[5] = data[4];\r
- AppendCrc14443a(dcmd, 6);\r
- ReaderTransmit(dcmd, sizeof(dcmd), NULL);\r
- int len = ReaderReceive(answer, answer_parity);\r
- if(!len) {\r
- if (MF_DBGLEVEL >= 1) Dbprintf("Authentication failed. Card timeout.");\r
- return 2;\r
- }\r
- return len;\r
-}\r
-\r
-int mifare_sendcmd_short_mfucauth(struct Crypto1State *pcs, uint8_t crypted, uint8_t cmd, uint8_t *data, uint8_t *answer, uint8_t *answer_parity, uint32_t *timing)\r
+// send X byte basic commands\r
+int mifare_sendcmd(uint8_t cmd, uint8_t* data, uint8_t data_size, uint8_t* answer, uint8_t *answer_parity, uint32_t *timing)\r