b7fb0630f2c466412337d25d2e611eeef7bc381b,ciphers/caesar_cipher.py,,decrypt,#Any#Any#,11
Before Change
decrypted = ""
for x in strng:
indx = (ord(x) - key) % 256
if indx < 32:
indx = indx + 95
decrypted = decrypted + chr(indx)
return decrypted
After Change
elif x.isupper():
result += chr((ord(x) - key - 65) % 26 + 65)
elif x.islower():
result += chr((ord(x) - key - 97) % 26 + 97)
return result
def brute_force(input_string: str) -> None:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: TheAlgorithms/Python
Commit Name: b7fb0630f2c466412337d25d2e611eeef7bc381b
Time: 2019-10-17
Author: 33547678+yuriimchg@users.noreply.github.com
File Name: ciphers/caesar_cipher.py
Class Name:
Method Name: decrypt
Project Name: TheAlgorithms/Python
Commit Name: b7fb0630f2c466412337d25d2e611eeef7bc381b
Time: 2019-10-17
Author: 33547678+yuriimchg@users.noreply.github.com
File Name: ciphers/caesar_cipher.py
Class Name:
Method Name: encrypt
Project Name: mittagessen/kraken
Commit Name: d1e6f8655410239f50cdda35f31377839cf630fb
Time: 2017-07-11
Author: andreas.buettner@uni-wuerzburg.de
File Name: kraken/ketos.py
Class Name:
Method Name: train