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

Function pubkey_from_hexstr

bitcoin/pubkey.c:50–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50bool pubkey_from_hexstr(const char *derstr, size_t slen, struct pubkey *key)
51{
52 size_t dlen;
53 unsigned char der[PUBKEY_CMPR_LEN];
54
55 dlen = hex_data_size(slen);
56 if (dlen != sizeof(der))
57 return false;
58
59 if (!hex_decode(derstr, slen, der, dlen))
60 return false;
61
62 return pubkey_from_der(der, dlen, key);
63}
64
65char *pubkey_to_hexstr(const tal_t *ctx, const struct pubkey *key)
66{

Callers 14

pubkeyFunction · 0.85
pubkeyFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
pubkey_from_hexFunction · 0.85
pubkey_from_hexFunction · 0.85
runFunction · 0.85
json_to_pubkeyFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 3

hex_data_sizeFunction · 0.85
hex_decodeFunction · 0.85
pubkey_from_derFunction · 0.85

Tested by 9

pubkeyFunction · 0.68
pubkeyFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68
pubkey_from_hexFunction · 0.68
pubkey_from_hexFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68