summaryrefslogtreecommitdiffstats
path: root/old/botan/wrappers/swig/tests/stream.py
diff options
context:
space:
mode:
Diffstat (limited to 'old/botan/wrappers/swig/tests/stream.py')
-rw-r--r--old/botan/wrappers/swig/tests/stream.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/old/botan/wrappers/swig/tests/stream.py b/old/botan/wrappers/swig/tests/stream.py
new file mode 100644
index 0000000..59d3ffa
--- /dev/null
+++ b/old/botan/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