// code for work with mifare cards.\r
//-----------------------------------------------------------------------------\r
\r
+#define CRYPT_NONE 0\r
+#define CRYPT_ALL 1\r
+#define CRYPT_REQUEST 2\r
+#define AUTH_FIRST 0\r
+#define AUTH_NESTED 2\r
+\r
+//mifare emulate states\r
+#define MFEMUL_NOFIELD 0\r
+#define MFEMUL_IDLE 1\r
+#define MFEMUL_SELECT1 2\r
+#define MFEMUL_SELECT2 3\r
+#define MFEMUL_AUTH1 4\r
+#define MFEMUL_AUTH2 5\r
+#define MFEMUL_HALTED 6\r
+\r
+//functions\r
+uint8_t* mifare_get_bigbufptr(void);\r
+int mifare_sendcmd_short(struct Crypto1State *pcs, uint8_t crypted, uint8_t cmd, uint8_t data, uint8_t* answer);\r
+int mifare_sendcmd_shortex(struct Crypto1State *pcs, uint8_t crypted, uint8_t cmd, uint8_t data, uint8_t* answer, uint32_t * parptr);\r
+\r
int mifare_classic_auth(struct Crypto1State *pcs, uint32_t uid, \\r
- uint8_t blockNo, uint8_t keyType, uint64_t ui64Key, uint64_t isNested);\r
+ uint8_t blockNo, uint8_t keyType, uint64_t ui64Key, uint64_t isNested);\r
+int mifare_classic_authex(struct Crypto1State *pcs, uint32_t uid, \\r
+ uint8_t blockNo, uint8_t keyType, uint64_t ui64Key, uint64_t isNested, uint32_t * ntptr);\r
int mifare_classic_readblock(struct Crypto1State *pcs, uint32_t uid, uint8_t blockNo, uint8_t *blockData); \r
int mifare_classic_writeblock(struct Crypto1State *pcs, uint32_t uid, uint8_t blockNo, uint8_t *blockData);\r
int mifare_classic_halt(struct Crypto1State *pcs, uint32_t uid); \r