Update content/_code-samples/escrow/py/generate_condition.py

Co-authored-by: Rome Reginelli <mduo13@gmail.com>
This commit is contained in:
Obiajulu
2022-09-06 20:58:26 -07:00
committed by GitHub
parent fde7e8d734
commit 4178875330

View File

@@ -5,8 +5,8 @@ from cryptoconditions import PreimageSha256
# """Generate a condition and fulfillment for escrows"""
# whatever you please
secret = urandom(random.randint(32, 64))
# Generate a random preimage with at least 32 bytes of cryptographically-secure randomness.
secret = urandom(32)
# generate cryptic image from secret
fufill = PreimageSha256(preimage=secret)