Created
August 5, 2015 09:17
-
-
Save mattseymour/99d92582f46889ceb7ee to your computer and use it in GitHub Desktop.
Python XOR encryption
This file contains hidden or 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
# Simple XOR encyption | |
def xor(self, string, key): | |
return ''.join(chr(ord(x) ^ ord(y)) for x, y in zip(string, cycle(key))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment