aboutsummaryrefslogtreecommitdiffstats
path: root/misc/swig/tests/stream.py
blob: 59d3ffa16c34376314225b24c166f101195a9a05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/python

import botan, base64

cipher = botan.StreamCipher("ARC4")

print cipher.name

key = botan.SymmetricKey(16)

cipher.set_key(key)
ciphertext = cipher.crypt("hi chappy")

cipher.set_key(key)
plaintext = cipher.crypt(ciphertext)

print plaintext