X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/aea4d76687f3aa3d5dcd0fc5cf3d36f8f753994c..8720c8f5d78adc1b74db72a6d5a4b6dbf82137bb:/client/util.h?ds=sidebyside diff --git a/client/util.h b/client/util.h index 7ac338cd..44a7eb56 100644 --- a/client/util.h +++ b/client/util.h @@ -10,9 +10,27 @@ #include #include +#include +#include +#include +#include +#include + +#ifndef MIN +# define MIN(a, b) (((a) < (b)) ? (a) : (b)) +#endif +#ifndef MAX +# define MAX(a, b) (((a) > (b)) ? (a) : (b)) +#endif int ukbhit(void); +void AddLogLine(char *fileName, char *extData, char *c); +void AddLogHex(char *fileName, char *extData, const uint8_t * data, const size_t len); +void AddLogUint64(char *fileName, char *extData, const uint64_t data); +void AddLogCurrentDT(char *fileName); +void FillFileNameByUID(char *fileName, uint8_t * uid, char *ext, int byteCount); + void print_hex(const uint8_t * data, const size_t len); char * sprint_hex(const uint8_t * data, const size_t len); @@ -26,3 +44,6 @@ uint32_t param_get32ex(const char *line, int paramnum, int deflt, int base); uint64_t param_get64ex(const char *line, int paramnum, int deflt, int base); int param_gethex(const char *line, int paramnum, uint8_t * data, int hexcnt); int param_getstr(const char *line, int paramnum, char * str); + +// Needed to Authenticate to Ultralight C tags & DESFIRE tags +void rol (uint8_t *data, const size_t len);