diff --git a/CutieDecrypt.py b/CutieDecrypt.py index 2cef070..e96d4e7 100644 --- a/CutieDecrypt.py +++ b/CutieDecrypt.py @@ -11,11 +11,11 @@ # # @Script: CutieDecrypt.py # @Date Created: 10 Apr, 2024 -# @Last Modified: 11 Apr, 2024 +# @Last Modified: 13 Apr, 2024 # @Last Modified by: Cutieguwu | Olivia Brooks # ---------------------------------------------------------- -def decrypt(dataEncoded: str, keyDecrypt: str): +def decrypt(dataEncoded: str, keyDecrypt: str, keyEnglish: str): """ Decrypts a string encoded using a substitution cypher based on the provided key.\n Characters closer to index 0 in `key` are more common in the English language. @@ -23,8 +23,6 @@ def decrypt(dataEncoded: str, keyDecrypt: str): dataDecrypted = "" - keyEnglish = "etaoinshrdlcumwfgypbvkjxqz" # Lewand's order of english characters; most to least common. - for c in dataEncoded: is_found = False @@ -44,6 +42,7 @@ with open("dataEncoded.txt", "r") as f: with open("key.txt", "r") as f: key = "".join(c for c in f.read() if c != "\n") -key = "qwertyuiopasdfghjklzxcvbnm" # Temporary faux testing key. +key = "qwertyuiopasdfghjklzxcvbnm" # Temporary - Faux testing key. +english = "etaoinshrdlcumwfgypbvkjxqz" # Temporary - Lewand's order of english characters; most to least common. -print(decrypt(data, key)) \ No newline at end of file +print(decrypt(data, key, english)) \ No newline at end of file