mirror of
https://github.com/20kaushik02/CSE548_ACNS_Work.git
synced 2025-12-06 07:54:07 +00:00
11 lines
392 B
Python
11 lines
392 B
Python
with open("3/forstudents/a/ciphertext.bin", "rb") as cipher_file, open(
|
|
"3/forstudents/a/key.bin", "rb"
|
|
) as key_file:
|
|
cipher_content = cipher_file.read()
|
|
key_content = key_file.read()
|
|
print(
|
|
((
|
|
int.from_bytes(cipher_content, "big") ^ int.from_bytes(key_content, "big")
|
|
).to_bytes(max(len(cipher_content), len(key_content)), "big")).decode()
|
|
)
|