diff options
Diffstat (limited to 'misc/python/test.py')
-rwxr-xr-x | misc/python/test.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/misc/python/test.py b/misc/python/test.py new file mode 100755 index 000000000..c73cc9369 --- /dev/null +++ b/misc/python/test.py @@ -0,0 +1,19 @@ +#!/usr/bin/python + +import sys, botan + +def do_hash(input): + pipe = botan.Pipe(botan.Filter("MD5"), botan.Filter("Hex_Encoder")) + + print pipe + pipe.start_msg() + pipe.write(input) + pipe.end_msg() + + return pipe.read_all() + +def main(): + print do_hash("foo") + +if __name__ == "__main__": + sys.exit(main()) |