138 http://inventwithpython.com/hacking
Email questions to the author: [email protected]
PROGRAMMING A PROGRAM TO
TEST OUR PROGRAM
Topics Covered In This Chapter:
The random.seed() function
The random.randint() function
List references
The copy.deepcopy() Functions
The random.shuffle() function
Randomly scrambling a string
The sys.exit() function
“It is poor civic hygiene to install technologies that
could someday facilitate a police state.”
Bruce Schneier, cryptographer
We can try out the transposition encryption and decryption programs from the previous chapter
by encrypting and decrypting a few messages with different keys. It seems to work pretty well.
But does it always work?