]>
Commit | Line | Data |
---|---|---|
fdd9395d OM |
1 | //----------------------------------------------------------------------------- |
2 | // Copyright (C) 2019 Merlok | |
3 | // | |
4 | // This code is licensed to you under the terms of the GNU GPL, version 2 or, | |
5 | // at your option, any later version. See the LICENSE.txt file for the text of | |
6 | // the license. | |
7 | //----------------------------------------------------------------------------- | |
8 | // MIFARE Application Directory (MAD) functions | |
9 | //----------------------------------------------------------------------------- | |
10 | ||
11 | #ifndef _MAD_H_ | |
12 | #define _MAD_H_ | |
13 | ||
14 | #include <stdint.h> | |
15 | #include <stdbool.h> | |
16 | #include <stddef.h> | |
17 | ||
18 | typedef struct { | |
19 | uint16_t AID; | |
20 | const char *Description; | |
21 | } madAIDDescr; | |
22 | ||
23 | extern int MADCheck(uint8_t *sector0, uint8_t *sector10, bool verbose, bool *haveMAD2); | |
24 | extern int MADDecode(uint8_t *sector0, uint8_t *sector10, uint16_t *mad, size_t *madlen); | |
25 | extern int MAD1DecodeAndPrint(uint8_t *sector, bool verbose, bool *haveMAD2); | |
26 | extern int MAD2DecodeAndPrint(uint8_t *sector, bool verbose); | |
27 | ||
28 | ||
29 | #endif // _MAD_H_ |