Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Mrinank-Bhowmick/python-beginner-projects
/ SHA256
Function
SHA256
web/public/playground/bitcoin-mining.py:13–14 ·
view source on GitHub ↗
(text)
Source
from the content-addressed store, hash-verified
11
12
# Hash a text string using SHA-256
13
def
SHA256(text):
14
return
sha256(text.encode(
"ascii"
)).hexdigest()
15
16
17
# Try nonces until the hash starts with enough zeros
Callers
1
mine
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected