Prepared for 128-bit destinations

This commit is contained in:
Mark Qvist 2022-06-30 13:51:46 +02:00
parent 8ef9e55a22
commit 681efb422d

View File

@ -279,7 +279,7 @@ class Browser:
components = url.split(":")
if len(components) == 1:
if len(components[0]) == 20:
if len(components[0]) == (RNS.Reticulum.TRUNCATED_HASHLENGTH//8)*2:
try:
destination_hash = bytes.fromhex(components[0])
except Exception as e:
@ -288,7 +288,7 @@ class Browser:
else:
raise ValueError("Malformed URL")
elif len(components) == 2:
if len(components[0]) == 20:
if len(components[0]) == (RNS.Reticulum.TRUNCATED_HASHLENGTH//8)*2:
try:
destination_hash = bytes.fromhex(components[0])
except Exception as e: