mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-26 22:55:49 +00:00
Update content/_code-samples/escrow/py/generate_condition.py
Co-authored-by: Rome Reginelli <mduo13@gmail.com>
This commit is contained in:
@@ -5,8 +5,8 @@ from cryptoconditions import PreimageSha256
|
|||||||
|
|
||||||
# """Generate a condition and fulfillment for escrows"""
|
# """Generate a condition and fulfillment for escrows"""
|
||||||
|
|
||||||
# whatever you please
|
# Generate a random preimage with at least 32 bytes of cryptographically-secure randomness.
|
||||||
secret = urandom(random.randint(32, 64))
|
secret = urandom(32)
|
||||||
|
|
||||||
# generate cryptic image from secret
|
# generate cryptic image from secret
|
||||||
fufill = PreimageSha256(preimage=secret)
|
fufill = PreimageSha256(preimage=secret)
|
||||||
|
|||||||
Reference in New Issue
Block a user