mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-05-02 22:54:54 -04:00
Updated examples
This commit is contained in:
parent
2e19304ebf
commit
c498bf5668
5 changed files with 31 additions and 11 deletions
|
@ -166,8 +166,12 @@ def client(destination_hexhash, configpath):
|
|||
# We need a binary representation of the destination
|
||||
# hash that was entered on the command line
|
||||
try:
|
||||
if len(destination_hexhash) != 20:
|
||||
raise ValueError("Destination length is invalid, must be 20 hexadecimal characters (10 bytes)")
|
||||
dest_len = (RNS.Reticulum.TRUNCATED_HASHLENGTH//8)*2
|
||||
if len(destination_hexhash) != dest_len:
|
||||
raise ValueError(
|
||||
"Destination length is invalid, must be {hex} hexadecimal characters ({byte} bytes).".format(hex=dest_len, byte=dest_len//2)
|
||||
)
|
||||
|
||||
destination_hash = bytes.fromhex(destination_hexhash)
|
||||
except:
|
||||
RNS.log("Invalid destination entered. Check your input!\n")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue