From f5e3af5326c05cc2c693529921cf05df7ac2a8d1 Mon Sep 17 00:00:00 2001 From: aaron Date: Sat, 4 Dec 2021 05:20:50 +0100 Subject: [PATCH] update writeup --- crypto/XMASSpirit/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/XMASSpirit/README.md b/crypto/XMASSpirit/README.md index ce4cb8e..2de273b 100644 --- a/crypto/XMASSpirit/README.md +++ b/crypto/XMASSpirit/README.md @@ -43,11 +43,11 @@ def get_factors(ct:bytes, n:int=256) -> (int, int): - When the factors are found, simply create a lookup table of all values and substitute each byte in the ciphertext. ```python -def decrypt(ct:bytes) -> bytes: +def decrypt(ct:bytes, lut:dict) -> bytes: ''' decrypt the file using the lookup table ''' res = b'' for byte in ct: - dec = lookup[byte] + dec = lut[byte] res += bytes([dec]) return res ```