diff options
author | lloyd <[email protected]> | 2009-10-28 22:55:12 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-10-28 22:55:12 +0000 |
commit | 3623be3fd05d890309cc3da4b3a1e319e357df65 (patch) | |
tree | 34ca43fcf8a7007cc01a3919f63e9ab6763cb673 /wrappers/swig/tests/hash.py | |
parent | fc1e61500e77fcabe67e6d2607810c1ba071bbdd (diff) | |
parent | 9462f875b13a321f42a127166d49670ca04afcde (diff) |
propagate from branch 'net.randombit.botan.1_8' (head 3158f8272a3582dd44dfb771665eb71f7d005339)
to branch 'net.randombit.botan' (head bf629b13dd132b263e76a72b7eca0f7e4ab19aac)
Diffstat (limited to 'wrappers/swig/tests/hash.py')
-rw-r--r-- | wrappers/swig/tests/hash.py | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/wrappers/swig/tests/hash.py b/wrappers/swig/tests/hash.py deleted file mode 100644 index 930b8c81a..000000000 --- a/wrappers/swig/tests/hash.py +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/python - -import botan, base64, md5 - -class PyMD5(botan.HashFunctionImpl): - def name(self): - return "PyMD5" - def update(self, input): - self.md5.update(input) - def final(self): - output = self.md5.digest() - self.md5 = md5.new() - return output - def __init__(self): - botan.HashFunctionImpl.__init__(self, 16, 64) - self.md5 = md5.new() - -hash = botan.HashFunction("SHA-256") - -print hash.name() -print hash.digest_size - -hash.update("hi") -hash.update(" ") -hash.update("chappy") -print base64.b16encode(hash.final()) - -hash2 = PyMD5() -hash2.update("hi chappy") -print base64.b16encode(hash2.final()) |