Basic encryption in Python