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

Function pubkey_to_hash160

bitcoin/pubkey.c:92–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 9

guess_to_remoteFunction · 0.85
scriptpubkey_p2wpkhFunction · 0.85
p2wpkh_scriptcodeFunction · 0.85
psbt_input_add_pubkeyFunction · 0.85
encode_pubkey_to_addrFunction · 0.85

Calls 3

pubkey_to_derFunction · 0.85
sha256Class · 0.70
ripemd160Class · 0.70

Tested by

no test coverage detected