return res ##############################################################################top-level entry points ##############################################################################def encode(pswd)return stringify(do_encode(pswd)encrypt plus string encode def decode(pswd)return do_decode(unstringify(pswd)in addition to encryptionthis module also implements an encoding method for already encrypted stringswhich transforms them to and from printable characters by defaultthe encoding functions do nothingand the system relies on straight url or html encoding of the encrypted string an optional encoding scheme translates the encrypted string to string of ascii code digits separated by dashes either encoding method makes nonprintable characters in the encrypted string printable to illustratelet' test this module' tools interactively for this testwe set forcereadablepassword to true the top-level entry points encode and decode into printable characters (for illustration purposesthis test reflects python installation where pycrypto is installed)from secret import using pycrypto data encode('spam@ +'data '------ decode(data'spam@ +but there are actually two steps to this--encryption and printable encodingraw do_encode('spam@ +'raw '/\xf \ \xaak\xf \xaf\ \xe \xf \ \ \ \xa ktext stringify(rawtext '------ len(raw)len(text( here' what the encoding looks like without the extra printable encodingraw do_encode('spam@ +'raw '/\xf \ \xaak\xf \xaf\ \xe \xf \ \ \ \xa kdo_decode(raw'spam@ +utility modules