MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / hash256

Function hash256

test/functional/test_framework/util.py:188–193  ·  view source on GitHub ↗
(byte_str)

Source from the content-addressed store, hash-verified

186 return hexlify(byte_str).decode('ascii')
187
188def hash256(byte_str):
189 sha256 = hashlib.sha256()
190 sha256.update(byte_str)
191 sha256d = hashlib.sha256()
192 sha256d.update(sha256.digest())
193 return sha256d.digest()[::-1]
194
195def hex_str_to_bytes(hex_str):
196 return unhexlify(hex_str.encode('ascii'))

Callers 5

_zmq_testMethod · 0.90
SignatureHashFunction · 0.70
byte_to_base58Function · 0.70
get_witness_scriptFunction · 0.70

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected