1 //-----------------------------------------------------------------------------
2 // Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
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.
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
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
);