aboutsummaryrefslogtreecommitdiffstats
path: root/misc/python/test.py
blob: c73cc9369bcd89a462feee2877518e0166043bf3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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())