finalise decryption of messages

This commit is contained in:
Nico Schottelius 2025-01-30 21:10:05 +01:00
commit 47337c8791

View file

@ -206,7 +206,7 @@ class UngleichMatrixClient:
print("session key = {session_key_base64}, {length}".format(session_key_base64=session_key_base64, length=len(session_key_base64)))
return session_key
return session_key_base64
def decrypt_message(self, ciphertext, session_id):
room_key = self.room_keys['rooms'][self.room_id]['sessions']
@ -221,9 +221,9 @@ class UngleichMatrixClient:
session_mac)
inbound_group = InboundGroupSession.import_session(session_key_base64)
plaintext = inbound_group.decrypt(message_ciphertext_base64)
plaintext = inbound_group.decrypt(ciphertext)
print(f"Encrypted {ciphertext} = {plaintext}")
print(f"Encrypted message {ciphertext} = {plaintext}")
def decrypt_room_messages(self):
"""