MCPcopy Create free account
hub / github.com/ElementsProject/lightning / hex_data_size

Function hex_data_size

ccan/ccan/str/hex/hex.h:69–72  ·  view source on GitHub ↗

* 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)); */

Source from the content-addressed store, hash-verified

67 * hex_decode(str, strlen(str), buf, sizeof(buf));
68 */
69static inline size_t hex_data_size(size_t strlen)
70{
71 return strlen / 2;
72}
73#endif /* CCAN_HEX_H */

Callers 13

signature_from_hexFunction · 0.85
bitcoin_tx_from_hexFunction · 0.85
bitcoin_block_from_hexFunction · 0.85
pubkey_from_hexstrFunction · 0.85
fromhexFunction · 0.85
fromhexFunction · 0.85
mainFunction · 0.85
log_one_lineFunction · 0.85
tal_hexdataFunction · 0.85
json_tok_bin_from_hexFunction · 0.85
print_nannounceFunction · 0.85
do_generateFunction · 0.85

Calls

no outgoing calls

Tested by 4

signature_from_hexFunction · 0.68
fromhexFunction · 0.68
fromhexFunction · 0.68
mainFunction · 0.68