Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions TheengsGateway/decryption.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ class VictronDecryptor(AdvertisementDecryptor):

def compute_nonce(self, address: str, decoded_json: dict) -> bytes:
"""Get the nonce from a specific address and JSON input."""
# The nonce is provided in the message and needs to be padded to 8 bytes
# The nonce is provided in the message and needs to be padded to 16 bytes
nonce = bytes.fromhex(decoded_json["ctr"])
nonce = nonce.ljust(8, b"\x00") # Pad to 8 bytes with zeros
nonce = nonce.ljust(16, b"\x00") # Pad to 16 bytes with zeros
return nonce

def decrypt(
Expand Down