Last active
November 15, 2015 01:55
-
-
Save Tony3-sec/233c4eb952852e043423 to your computer and use it in GitHub Desktop.
XOR encode the user input with arbitary key
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 | |
## Simple xor encoder | |
def simpleXOR(): | |
result = '' | |
data = raw_input('Enter data: ') | |
key = raw_input('Enter key: ') | |
for i in data: | |
result += chr(ord(i) ^ int(key)) | |
return result | |
simpleXOR() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment