Skip to content

Commit bcb5977

Browse files
committed
Fix Python 3.10 compatibility
1 parent 7aadbc5 commit bcb5977

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mautrix/crypto/ssss/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def prepare_aes(key: bytes, iv: str | bytes) -> AES:
6767
iv = unpaddedbase64.decode_base64(iv)
6868
# initial_value = struct.unpack(">Q", iv[8:])[0]
6969
# counter = Counter.new(64, prefix=iv[:8], initial_value=initial_value)
70-
counter = Counter.new(128, initial_value=int.from_bytes(iv))
70+
counter = Counter.new(128, initial_value=int.from_bytes(iv, byteorder="big"))
7171
return AES.new(key=key, mode=AES.MODE_CTR, counter=counter)
7272

7373

0 commit comments

Comments
 (0)