aboutsummaryrefslogtreecommitdiffstats
path: root/wrappers/swig/tests/mac.py
diff options
context:
space:
mode:
Diffstat (limited to 'wrappers/swig/tests/mac.py')
-rw-r--r--wrappers/swig/tests/mac.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/wrappers/swig/tests/mac.py b/wrappers/swig/tests/mac.py
new file mode 100644
index 000000000..6110b6102
--- /dev/null
+++ b/wrappers/swig/tests/mac.py
@@ -0,0 +1,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())