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

Function pubkey_to_hash160

bitcoin/pubkey.c:94–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94void pubkey_to_hash160(const struct pubkey *pk, struct ripemd160 *hash)
95{
96 u8 der[PUBKEY_CMPR_LEN];
97 struct sha256 h;
98
99 pubkey_to_der(der, pk);
100 sha256(&h, der, sizeof(der));
101 ripemd160(hash, h.u.u8, sizeof(h));
102}
103
104void fromwire_pubkey(const u8 **cursor, size_t *max, struct pubkey *pubkey)
105{

Callers 8

scriptpubkey_p2wpkhFunction · 0.70
p2wpkh_scriptcodeFunction · 0.70
psbt_input_add_pubkeyFunction · 0.70
guess_to_remoteFunction · 0.50
encode_pubkey_to_addrFunction · 0.50

Calls 3

pubkey_to_derFunction · 0.70
sha256Class · 0.70
ripemd160Class · 0.70

Tested by

no test coverage detected