MCPcopy
hub / github.com/petertodd/python-bitcoinlib / Hash

Function Hash

bitcoin/core/serialize.py:28–30  ·  view source on GitHub ↗

SHA256^2)(msg) -> bytes

(msg)

Source from the content-addressed store, hash-verified

26
27
28def Hash(msg):
29 """SHA256^2)(msg) -> bytes"""
30 return hashlib.sha256(hashlib.sha256(msg).digest()).digest()
31
32def Hash160(msg):
33 """RIPEME160(SHA256(msg)) -> bytes"""

Callers 8

GetTxidMethod · 0.85
CheckBlockFunction · 0.85
GetHashMethod · 0.85
test_checkblockMethod · 0.85
test_serializationMethod · 0.85
test_serializationMethod · 0.85

Calls

no outgoing calls

Tested by 3

test_checkblockMethod · 0.68
test_serializationMethod · 0.68
test_serializationMethod · 0.68