From de8ac9f9f944154d05092425d816d6e9452bb2aa Mon Sep 17 00:00:00 2001 From: CapOfWeird Date: Wed, 7 Oct 2020 08:20:04 -0400 Subject: [PATCH 1/2] Fixed typo in caesar_cipher.py --- ciphers/caesar_cipher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ciphers/caesar_cipher.py b/ciphers/caesar_cipher.py index 7bda519767a1..4038919e5dde 100644 --- a/ciphers/caesar_cipher.py +++ b/ciphers/caesar_cipher.py @@ -220,7 +220,7 @@ def brute_force(input_string: str, alphabet=None) -> dict: def main(): while True: print(f'\n{"-" * 10}\n Menu\n{"-" * 10}') - print(*["1.Encrpyt", "2.Decrypt", "3.BruteForce", "4.Quit"], sep="\n") + print(*["1.Encrypt", "2.Decrypt", "3.BruteForce", "4.Quit"], sep="\n") # get user input choice = input("\nWhat would you like to do?: ").strip() or "4" From 0b7c283ec0981c38f510d5049d02e72d222db9fd Mon Sep 17 00:00:00 2001 From: CapOfWeird Date: Wed, 7 Oct 2020 10:12:24 -0400 Subject: [PATCH 2/2] Typo fixes --- ciphers/xor_cipher.py | 2 +- hashes/sha1.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ciphers/xor_cipher.py b/ciphers/xor_cipher.py index 3b045fdac64a..5b0b510944a0 100644 --- a/ciphers/xor_cipher.py +++ b/ciphers/xor_cipher.py @@ -183,7 +183,7 @@ def decrypt_file(self, file, key): # crypt = XORCipher() # key = 67 -# # test enrcypt +# # test encrypt # print(crypt.encrypt("hallo welt",key)) # # test decrypt # print(crypt.decrypt(crypt.encrypt("hallo welt",key), key)) diff --git a/hashes/sha1.py b/hashes/sha1.py index 04ecdd788039..cca38b7c3fdc 100644 --- a/hashes/sha1.py +++ b/hashes/sha1.py @@ -8,7 +8,7 @@ Also contains a Test class to verify that the generated Hash is same as that returned by the hashlib library -SHA1 hash or SHA1 sum of a string is a crytpographic function which means it is easy +SHA1 hash or SHA1 sum of a string is a cryptographic function which means it is easy to calculate forwards but extremely difficult to calculate backwards. What this means is, you can easily calculate the hash of a string, but it is extremely difficult to know the original string if you have its hash. This property is useful to communicate