fix coverity CID 349306 - resource leak
[RRG-proxmark3.git] / common / cardhelper.h
blob1ef5b646ead0d2660146a38706a1314e51175b7f
1 //-----------------------------------------------------------------------------
2 // Iceman, February 2020
3 //
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
6 // the license.
7 //-----------------------------------------------------------------------------
8 // Utility functions used in many places, not specific to any piece of code.
9 //-----------------------------------------------------------------------------
11 #ifndef __CARDHELPER_H
12 #define __CARDHELPER_H
14 #include <ctype.h>
15 #include "common.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);
27 #endif