]>
cvs.zerfleddert.de Git - proxmark3-svn/blob - client/emv/apduinfo.h
1 //-----------------------------------------------------------------------------
2 // Copyright (C) 2017 Merlok
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
7 //-----------------------------------------------------------------------------
8 // APDU status bytes information
9 //-----------------------------------------------------------------------------
17 #define APDUCODE_TYPE_NONE 0
18 #define APDUCODE_TYPE_INFO 1
19 #define APDUCODE_TYPE_WARNING 2
20 #define APDUCODE_TYPE_ERROR 3
21 #define APDUCODE_TYPE_SECURITY 4
26 const char *Description
;
44 } PACKED ExtAPDUHeader
;
58 extern const APDUCode
*GetAPDUCode(uint8_t sw1
, uint8_t sw2
);
59 extern const char *GetAPDUCodeDescription(uint8_t sw1
, uint8_t sw2
);
60 extern int APDUDecode(uint8_t *data
, int len
, APDUStruct
*apdu
);
61 extern int APDUEncode(APDUStruct
*apdu
, uint8_t *data
, int *len
);
62 extern int APDUEncodeS(sAPDU
*apdu
, bool extended
, uint16_t le
, uint8_t *data
, int *len
);
63 extern void APDUPrint(APDUStruct apdu
);
64 extern void APDUPrintEx(APDUStruct apdu
, size_t maxdatalen
);