Last active
October 28, 2018 05:17
-
-
Save lingmujianshi/53daebb29a08d2abe449a09523d12df3 to your computer and use it in GitHub Desktop.
decrypt for HS105
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
def decrypt(string): | |
key = 171 | |
result = "" | |
for i in string: | |
a = key ^ i #python2 a = key ^ ord(i) | |
key = i #python2 key = ord(i) | |
result += chr(a) | |
return result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment