aboutsummaryrefslogtreecommitdiffstats
path: root/misc/python/test.py
blob: aa30ab5d6f61b3619bf72350d2f732d1a1f7cc5d (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("Hex_Encoder"),
                      botan.Filter("Hex_Decoder"))

    pipe.start_msg()
    pipe.write(input)
    pipe.end_msg()

    return pipe.read_all_as_string()

def main():
    print do_hash("hi chappy")

if __name__ == "__main__":
    sys.exit(main())