From 60839481adb1bc3fb9f7e9c0b5bbd90c2e4565dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Tue, 12 Mar 2024 11:46:46 +0100 Subject: [PATCH] feat: add tool preimage generator (#2321) `poetry run python tools/preimage.py` --- tools/preimage.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tools/preimage.py diff --git a/tools/preimage.py b/tools/preimage.py new file mode 100644 index 000000000..48b5d0519 --- /dev/null +++ b/tools/preimage.py @@ -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()}")