Jan-14-2017, 10:56 AM
Hm! The simplest encryption for me is just to use a bitwise xor against some key.
>>> word = 'hello world' >>> enc = "".join([chr(ord(char) ^ ord('a')) for char in word]) >>> enc '\t\x04\r\r\x0eA\x16\x0e\x13\r\x05' >>> dec = "".join([chr(ord(char) ^ ord('a')) for char in enc]) >>> dec 'hello world'