rotor newrotor('pymailcgi' decrypt(' \ \ py''spam can be decrypted in new process use "\asciiescapes for two chars our secret module by default simply used rotor to encrypt and did no additional encoding of its own it relies on url encoding when the password is embedded in url parameter and on html escaping when the password is embedded in hidden form fields for urlsthe following sorts of calls occurfrom secret import encodedecode encode('abc$#&+' \ \ \ \ \ \ cgi scripts do this import urllib parse urllib parse quote_plus(xy '+% % %cf% % % urlencode does this urllib parse unquote_plus(ya \ \ \ \ \ \ cgi fieldstorage does this decode( 'abc$#&+cgi scripts do this although rotor itself is not widely viable option todaythese same techniques can be used with other encryption schemes manual data encryptionpycrypto variety of encryption tools are available in the third-party public domainincluding the popular python cryptography toolkitalso known as pycrypto this package adds built-in modules for private and public key algorithms such as aesdesideaand rsa encryptionprovides python module for reading and decrypting pgp filesand much more here is an example of using aes encryptionrun after installing pycrypto on my machine with windows self-installerfrom crypto cipher import aes aes block_size mykey 'pymailcgiljust( '-'key must be or bytes mykey 'pymailcgipassword 'already got one length must be multiple of aesobj aes new(mykeyaes mode_ecbcyphertext aesobj encrypt(passwordcyphertext '\xfez\ \xb \ "\xd \xb \xe \ ~ ]aesobj aes new(mykeyaes mode_ecbaesobj decrypt(cyphertext'already got one the pymailcgi server