Random hash length from truncated hash length

This commit is contained in:
Mark Qvist 2022-04-20 13:08:21 +02:00
parent 38aeb1ab3b
commit 402b5fc461
1 changed files with 1 additions and 1 deletions

View File

@ -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):