running server deployed for this book still does not support https in python -the ultimate solution to web securitywhich 'll say more about in moment because of all the foregoingthis fourth edition has legacy support for both rotor and pycrypto if they are installedbut falls back on simplistic password obfuscator which may be different at each pymailcgi installation since this release is something of prototype in generalfurther refinement of this modelincluding support for https under more robust web serversis left as exercise in generalthere are variety of approaches to encrypting information transferred back and forth between client and server unfortunately againnone is easily implemented for this examplenone is universally applicableand most involve tools or techniques that are well beyond the scope and size constraints of this text to sample some of the available optionsthoughthe sections that follow contain brief rundown of some of the common techniques in this domain manual data encryptionrotor (defunctin principlecgi scripts can manually encrypt any sensitive data they insert into reply streamsas pymailcgi did in this book' second edition with the removal of the rotor modulethoughpython ' standard library has no encryption tools for this task moreoverusing the original rotor module' code is not advisable from maintenance perspective and would not be straightforwardsince it was coded in the language (it' not simple matter of copying py file from prior releaseunless you are using an older version of pythonrotor is not real option mostly for historical interest and comparison todaythis module was used as follows it was based on an enigma-style encryption schemewe make new rotor object with key (and optionallya rotor countand call methods to encrypt and decryptimport rotor rotor newrotor('pymailcgi' encrypt('abc '\ an\ \ encrypt('spam ' ' \ \ pylen( decrypt( 'spam (key[,numrotors]may return nonprintable chars result is same len as input notice that the same rotor object can encrypt multiple stringsthat the result may contain nonprintable characters (printed as \ascii escape codes when displayed)and that the result is always the same length as the original string most importanta string encrypted with rotor can be decrypted in different process ( in later cgi scriptif we re-create the rotor objectutility modules