From 402b5fc46163176762965735776149c422e5e607 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Wed, 20 Apr 2022 13:08:21 +0200 Subject: [PATCH] Random hash length from truncated hash length --- RNS/Identity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RNS/Identity.py b/RNS/Identity.py index 504035d..178a434 100644 --- a/RNS/Identity.py +++ b/RNS/Identity.py @@ -180,7 +180,7 @@ class Identity: :param data: Data to be hashed as *bytes*. :returns: Truncated SHA-256 hash of random data as *bytes* """ - return Identity.truncated_hash(os.urandom(10)) + return Identity.truncated_hash(os.urandom(Identity.TRUNCATED_HASHLENGTH//8)) @staticmethod def validate_announce(packet):