mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2024-11-19 01:43:42 +01: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…
Reference in New Issue
Block a user