]> git.zerfleddert.de Git - proxmark3-svn/blame - client/mifare4.h
Mfp read plain (#704)
[proxmark3-svn] / client / mifare4.h
CommitLineData
ae3340a0
OM
1//-----------------------------------------------------------------------------
2// Copyright (C) 2018 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// iso14443-4 mifare commands
9//-----------------------------------------------------------------------------
10
11#ifndef MIFARE4_H
12#define MIFARE4_H
13
14#include <stdint.h>
15#include <stdbool.h>
16#include <stddef.h>
17
18typedef struct {
19 bool Authenticated;
c8a0f550 20 uint8_t Key[16];
ae3340a0
OM
21 uint16_t KeyNum;
22 uint8_t Rnd1[16];
23 uint8_t Rnd2[16];
24
25}mf4Session;
26
c8a0f550 27extern int CalculateMAC(mf4Session *session, uint8_t *data, int datalen, uint8_t *mac, bool verbose);
ae3340a0
OM
28extern int MifareAuth4(mf4Session *session, uint8_t *keyn, uint8_t *key, bool activateField, bool leaveSignalON, bool verbose);
29
c8a0f550
OM
30extern uint8_t mfNumBlocksPerSector(uint8_t sectorNo);
31extern uint8_t mfFirstBlockOfSector(uint8_t sectorNo);
32extern uint8_t mfSectorTrailer(uint8_t blockNo);
33extern bool mfIsSectorTrailer(uint8_t blockNo);
34extern uint8_t mfSectorNum(uint8_t blockNo);
ae3340a0
OM
35
36
37#endif // mifare4.h
Impressum, Datenschutz