1 //-----------------------------------------------------------------------------
2 // Iceman, February 2020
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 // Utility functions used in many places, not specific to any piece of code.
9 //-----------------------------------------------------------------------------
11 #ifndef __CARDHELPER_H
12 #define __CARDHELPER_H
17 bool IsCardHelperPresent(bool verbose
);
18 bool Encrypt(uint8_t *src
, uint8_t *dest
);
19 bool Decrypt(uint8_t *src
, uint8_t *dest
);
20 void DecodeBlock6(uint8_t *src
);
21 uint8_t GetNumberBlocksForUserId(uint8_t *src
);
22 uint8_t GetPinSize(uint8_t *src
);
24 int GetConfigCardByIdx(uint8_t typ
, uint8_t *blocks
);
25 int GetConfigCardStrByIdx(uint8_t typ
, uint8_t *out
);
26 int VerifyRdv4Signature(uint8_t *memid
, uint8_t *signature
);