R&Y: Added DAY RTA Tapp Card and Additional BKK BEM Stored Value Card AIDs to `aid_de...
[RRG-proxmark3.git] / tools / cryptorf / util.h
blob4f08469e382fb06bbeaa495ba63a02f700615d2e
1 /*
3 * Various Utilities
5 * Copyright (C) 2010, Flavio D. Garcia, Peter van Rossum, Roel Verdult
6 * and Ronny Wichers Schreur. Radboud University Nijmegen
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #ifndef _UTIL_H_
24 #define _UTIL_H_
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
30 #include <stdint.h>
31 #include <stddef.h>
33 #define AEND "\x1b[0m"
35 #define _BLUE_(s) "\x1b[34m" s AEND
36 #define _RED_(s) "\x1b[31m" s AEND
37 #define _GREEN_(s) "\x1b[32m" s AEND
38 #define _YELLOW_(s) "\x1b[33m" s AEND
39 #define _MAGENTA_(s) "\x1b[35m" s AEND
40 #define _CYAN_(s) "\x1b[36m" s AEND
41 #define _WHITE_(s) "\x1b[37m" s AEND
43 void num_to_bytes(uint64_t n, size_t len, uint8_t *dst);
44 void print_bytes(const uint8_t *pbtData, const size_t szLen);
46 #ifdef __cplusplus
48 #endif
49 #endif // _UTIL_H_