feat: add tool preimage generator (#2321)

`poetry run python tools/preimage.py`
This commit is contained in:
dni ⚡
2024-03-12 11:46:46 +01:00
committed by GitHub
parent 3ef1941fc0
commit 60839481ad
+8
View File
@@ -0,0 +1,8 @@
import hashlib
import os
preimage = os.urandom(32)
preimage_hash = hashlib.sha256(preimage).hexdigest()
print(f"preimage hash: {preimage_hash}")
print(f"preimage: {preimage.hex()}")