MCPcopy Index your code
hub / github.com/codebasics/cool_python_apps / SHA256

Function SHA256

2_bitcoin_mining/bitcoin_mining.py:4–5  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

2MAX_NONCE = 100000000000
3
4def SHA256(text):
5 return sha256(text.encode("ascii")).hexdigest()
6
7def mine(block_number, transactions, previous_hash, prefix_zeros):
8 prefix_str = '0'*prefix_zeros

Callers 1

mineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected