aboutsummaryrefslogtreecommitdiffstats
path: root/wrappers/swig/doit.py
diff options
context:
space:
mode:
Diffstat (limited to 'wrappers/swig/doit.py')
-rwxr-xr-xwrappers/swig/doit.py49
1 files changed, 0 insertions, 49 deletions
diff --git a/wrappers/swig/doit.py b/wrappers/swig/doit.py
deleted file mode 100755
index 98bc97087..000000000
--- a/wrappers/swig/doit.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/python2
-
-import botan
-
-def hash_it(hash, input):
- f1 = botan.Filter("MD5")
- f2 = botan.Filter("Hex_Encoder")
- pipe = botan.Pipe(f1, f2)
-
- pipe.start_msg()
- pipe.write_string(input)
- pipe.end_msg()
-
- print pipe.remaining()
-
- out = pipe.read(0)
-
-
-
-
-def main:
- init = botan.LibraryInitializer
-
- print hash_it("MD5", "foo")
-
-
- key1 = botan.SymmetricKey("ABCD")
- print key1.as_string()
- key2 = botan.SymmetricKey(16)
- print key2.as_string()
-
- iv1 = botan.InitializationVector(8)
- print iv1.as_string()
-
-
- f3 = pipe.read(pipe.remaining())
-
- size = pipe.remaining()
- out = botan.byte_array(size)
- pipe.read(out.cast,size)
-
- for i in range (0,size):
- print "%02X" % out[i]
-
- print pipe.read_all_as_string()
-
-if __name__ == "__main__":
- sys.exit(main())
-