diff options
Diffstat (limited to 'wrappers/swig/tests/stream.py')
-rw-r--r-- | wrappers/swig/tests/stream.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/wrappers/swig/tests/stream.py b/wrappers/swig/tests/stream.py new file mode 100644 index 000000000..59d3ffa16 --- /dev/null +++ b/wrappers/swig/tests/stream.py @@ -0,0 +1,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 |