]> git.zerfleddert.de Git - proxmark3-svn/blame - common/iso14443crc.h
FIX: lf hitag : Mea culpa, simulation should not have reader_field on. thanks to...
[proxmark3-svn] / common / iso14443crc.h
CommitLineData
bd20f8f4 1//-----------------------------------------------------------------------------
2// This code is licensed to you under the terms of the GNU GPL, version 2 or,
3// at your option, any later version. See the LICENSE.txt file for the text of
4// the license.
5//-----------------------------------------------------------------------------
6// ISO14443 CRC calculation code.
7//-----------------------------------------------------------------------------
8
9#ifndef __ISO14443CRC_H
10#define __ISO14443CRC_H
7838f4be 11#include "common.h"
7fe9b0b7 12
13//-----------------------------------------------------------------------------
14// Routines to compute the CRCs (two different flavours, just for confusion)
15// required for ISO 14443, swiped directly from the spec.
16//-----------------------------------------------------------------------------
17#define CRC_14443_A 0x6363 /* ITU-V.41 */
18#define CRC_14443_B 0xFFFF /* ISO/IEC 13239 (formerly ISO/IEC 3309) */
b1013281 19#define CRC_ICLASS 0xE012 /* ICLASS PREFIX */
7fe9b0b7 20
905c55de 21unsigned short UpdateCrc14443(unsigned char ch, unsigned short *lpwCrc);
7fe9b0b7 22void ComputeCrc14443(int CrcType,
39864b0b 23 const unsigned char *Data, int Length,
7fe9b0b7 24 unsigned char *TransmitFirst,
25 unsigned char *TransmitSecond);
39864b0b 26int CheckCrc14443(int CrcType, const unsigned char *Data, int Length);
7fe9b0b7 27
28#endif
Impressum, Datenschutz