Kaushik Narayan R 640aa3e9af 1.1 done
also initial commit
2024-01-31 15:41:22 -07:00

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()
)