Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from itertools import cycle, izip
- def xorStrings(message,key):
- #http://dustri.org/b/elegant-xor-encryption-in-python.html
- return ''.join(chr(ord(c)^ord(k)) for c,k in izip(message, cycle(key)))
- #questo metodo ripete la chiave perche' potrebbe non essere lunga come il testo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement