blob: 475ac16cd89d646275fed8782b22ae419f01b756 [file] [log] [blame]
Barry Warsaw5e056bb1996-12-23 23:39:42 +00001import rotor
2
3r = rotor.newrotor("you'll never guess this")
4r = rotor.newrotor("you'll never guess this", 12)
5
6A = 'spam and eggs'
7B = 'cheese shop'
8
9a = r.encrypt(A)
10print a
11b = r.encryptmore(B)
12print b
13
14A1 = r.decrypt(a)
15print A1
16if A1 <> A:
17 print 'decrypt failed'
18
19B1 = r.decryptmore(b)
20print B1
21if B1 <> B:
22 print 'decryptmore failed'
23
24r.setkey()
25r.setkey('you guessed it!')