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

Function hash160

bitcoin/script.c:17–23  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

15
16/* Bitcoin's OP_HASH160 is RIPEMD(SHA256()) */
17static void hash160(struct ripemd160 *redeemhash, const void *mem, size_t len)
18{
19 struct sha256 h;
20
21 sha256(&h, mem, len);
22 ripemd160(redeemhash, h.u.u8, sizeof(h));
23}
24
25static void add(u8 **scriptp, const void *mem, size_t len)
26{

Callers 2

scriptpubkey_p2shFunction · 0.85

Calls 2

sha256Class · 0.70
ripemd160Class · 0.70

Tested by

no test coverage detected