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

Function hash160

bitcoin/script.c:30–36  ·  view source on GitHub ↗

Bitcoin's OP_HASH160 is RIPEMD(SHA256()) */

Source from the content-addressed store, hash-verified

28
29/* Bitcoin's OP_HASH160 is RIPEMD(SHA256()) */
30static void hash160(struct ripemd160 *redeemhash, const void *mem, size_t len)
31{
32 struct sha256 h;
33
34 sha256(&h, mem, len);
35 ripemd160(redeemhash, h.u.u8, sizeof(h));
36}
37
38static void add(u8 **scriptp, const void *mem, size_t len)
39{

Callers 2

scriptpubkey_p2shFunction · 0.85

Calls 2

sha256Class · 0.70
ripemd160Class · 0.70

Tested by

no test coverage detected