mirror of
https://github.com/lnbits/lnbits.git
synced 2025-06-19 13:21:08 +02:00
feat: add tool preimage generator (#2321)
`poetry run python tools/preimage.py`
This commit is contained in:
parent
3ef1941fc0
commit
60839481ad
8
tools/preimage.py
Normal file
8
tools/preimage.py
Normal 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()}")
|
Loading…
x
Reference in New Issue
Block a user