未验证 提交 05f4089b 编写于 作者: C CapofWeird 提交者: GitHub

Fixed typo in caesar_cipher.py (#2979)

* Fixed typo in caesar_cipher.py

* Typo fixes
上级 a88006d0
...@@ -220,7 +220,7 @@ def brute_force(input_string: str, alphabet=None) -> dict: ...@@ -220,7 +220,7 @@ def brute_force(input_string: str, alphabet=None) -> dict:
def main(): def main():
while True: while True:
print(f'\n{"-" * 10}\n Menu\n{"-" * 10}') 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 # get user input
choice = input("\nWhat would you like to do?: ").strip() or "4" choice = input("\nWhat would you like to do?: ").strip() or "4"
......
...@@ -183,7 +183,7 @@ class XORCipher: ...@@ -183,7 +183,7 @@ class XORCipher:
# crypt = XORCipher() # crypt = XORCipher()
# key = 67 # key = 67
# # test enrcypt # # test encrypt
# print(crypt.encrypt("hallo welt",key)) # print(crypt.encrypt("hallo welt",key))
# # test decrypt # # test decrypt
# print(crypt.decrypt(crypt.encrypt("hallo welt",key), key)) # print(crypt.decrypt(crypt.encrypt("hallo welt",key), key))
......
...@@ -8,7 +8,7 @@ Usage: python sha1.py --string "Hello World!!" ...@@ -8,7 +8,7 @@ Usage: python sha1.py --string "Hello World!!"
Also contains a Test class to verify that the generated Hash is same as that Also contains a Test class to verify that the generated Hash is same as that
returned by the hashlib library 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 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 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 know the original string if you have its hash. This property is useful to communicate
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册