| 27 | enum { TA_FILE_MAX = 512 << 20 }; |
| 28 | |
| 29 | static void ta_hex(const unsigned char bytes[32], char hex[65]) { |
| 30 | static const char digits[] = "0123456789abcdef"; |
| 31 | for (int i = 0; i < 32; i++) { |
| 32 | hex[2 * i] = digits[bytes[i] >> 4]; |
| 33 | hex[2 * i + 1] = digits[bytes[i] & 15]; |
| 34 | } |
| 35 | hex[64] = '\0'; |
| 36 | } |
| 37 | |
| 38 | static bool ta_unhex(const char *hex, unsigned char bytes[32]) { |
| 39 | if (!hex || strlen(hex) != 64) { |
no outgoing calls
no test coverage detected