R&Y: Added DAY RTA Tapp Card and Additional BKK BEM Stored Value Card AIDs to `aid_de...
[RRG-proxmark3.git] / common / cardhelper.h
blobb88ff1e16ab4610dd35a02a1eaf931ff08a96ad9
1 //-----------------------------------------------------------------------------
2 // Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // See LICENSE.txt for the text of the license.
15 //-----------------------------------------------------------------------------
16 // Utility functions used in many places, not specific to any piece of code.
17 //-----------------------------------------------------------------------------
19 #ifndef __CARDHELPER_H
20 #define __CARDHELPER_H
22 #include <ctype.h>
23 #include "common.h"
25 bool IsHIDSamPresent(bool verbose);
26 bool IsCardHelperPresent(bool verbose);
27 bool Encrypt(uint8_t *src, uint8_t *dest);
28 bool Decrypt(uint8_t *src, uint8_t *dest);
29 void DecodeBlock6(uint8_t *src);
30 uint8_t GetNumberBlocksForUserId(uint8_t *src);
31 uint8_t GetPinSize(uint8_t *src);
33 int GetConfigCardByIdx(uint8_t typ, uint8_t *blocks);
34 int GetConfigCardStrByIdx(uint8_t typ, uint8_t *out);
35 int VerifyRdv4Signature(uint8_t *memid, uint8_t *signature);
36 #endif