A Pen by Josiah Holmes on CodePen.
I hereby claim:
- I am josiahholmes on github.
- I am josiahholmes (https://keybase.io/josiahholmes) on keybase.
- I have a public key ASAcmcr5GIDKBAgPsOxaGErornzBjQ2qukIHRB6Mp2cacAo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
def bestDecryption(ciphertext): | |
bestKey = -1 | |
maxScore = -1 | |
bestPlaintext = '' | |
for val in range(256): | |
plaintext = xorDecrypt(ciphertext,val) | |
score = englishScore(plaintext) | |
if score > maxScore: |