Mercurial > cpython-lru_cache-weakref
view Lib/test/test_rotor.py @ 5817:48b94de85bf3 legacy-trunk
Extensive changes by AMK.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 17 Jul 1997 16:29:42 +0000 |
| parents | 88dbfa2bb9dc |
| children | 0ad15f30c8d4 |
line wrap: on
line source
import rotor r = rotor.newrotor("you'll never guess this") r = rotor.newrotor("you'll never guess this", 12) A = 'spam and eggs' B = 'cheese shop' a = r.encrypt(A) print a b = r.encryptmore(B) print b A1 = r.decrypt(a) print A1 if A1 <> A: print 'decrypt failed' B1 = r.decryptmore(b) print B1 if B1 <> B: print 'decryptmore failed' try: r.setkey() except TypeError: pass r.setkey('you guessed it!')
