aboutsummaryrefslogtreecommitdiffstats
path: root/misc/swig/tests/mac.py
blob: 6110b610220035eabec98bcbbab1cf3a1884866c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/python

import botan, base64

mac = botan.MAC("HMAC(SHA-512)")

print mac.name
print mac.output_length

mac.set_key(botan.SymmetricKey("abcd"))
mac.update("hi chappy")
print base64.b16encode(mac.final())