2019-02-22 01:34:12 +08:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// Copyright (C) 2019 Merlok
|
|
|
|
//
|
|
|
|
// This code is licensed to you under the terms of the GNU GPL, version 2 or,
|
|
|
|
// at your option, any later version. See the LICENSE.txt file for the text of
|
|
|
|
// the license.
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// MIFARE Application Directory (MAD) functions
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#ifndef _MAD_H_
|
|
|
|
#define _MAD_H_
|
|
|
|
|
2019-08-08 22:57:33 +08:00
|
|
|
#include "common.h"
|
2019-02-22 01:34:12 +08:00
|
|
|
|
|
|
|
typedef struct {
|
2019-03-10 06:35:06 +08:00
|
|
|
uint16_t AID;
|
|
|
|
const char *Description;
|
2019-03-09 15:59:13 +08:00
|
|
|
} madAIDDescr;
|
2019-02-22 01:34:12 +08:00
|
|
|
|
2019-04-06 06:52:55 +08:00
|
|
|
int MADCheck(uint8_t *sector0, uint8_t *sector10, bool verbose, bool *haveMAD2);
|
|
|
|
int MADDecode(uint8_t *sector0, uint8_t *sector10, uint16_t *mad, size_t *madlen);
|
|
|
|
int MAD1DecodeAndPrint(uint8_t *sector, bool verbose, bool *haveMAD2);
|
|
|
|
int MAD2DecodeAndPrint(uint8_t *sector, bool verbose);
|
2019-02-22 01:34:12 +08:00
|
|
|
|
|
|
|
|
|
|
|
#endif // _MAD_H_
|