* hex_data_size - Calculate how many bytes of data in a hex string * @strlen: the length of the string (with or without NUL) * * Example: * const char str[] = "1F2F"; * unsigned char buf[hex_data_size(sizeof(str))]; * * hex_decode(str, strlen(str), buf, sizeof(buf)); */
| 67 | * hex_decode(str, strlen(str), buf, sizeof(buf)); |
| 68 | */ |
| 69 | static inline size_t hex_data_size(size_t strlen) |
| 70 | { |
| 71 | return strlen / 2; |
| 72 | } |
| 73 | #endif /* CCAN_HEX_H */ |
no outgoing calls