summaryrefslogtreecommitdiff
path: root/hash/hash_wrapper.cpp
diff options
context:
space:
mode:
authorzyp <zyp@localhost>2006-01-26 20:07:15 +0100
committerzyp <zyp@localhost>2006-01-26 20:07:15 +0100
commit21559e9f4bd58b1504cc0fda7b0dceee0c833862 (patch)
tree119240a883b5bda7e4c11f60dc39206e87b1e04f /hash/hash_wrapper.cpp
[project @ zyp-20060126190715-557e941315671b81]
[project @ 18] Moved disccat and pyanidb to the right location. Added pyqtmpc and ophidia.
Diffstat (limited to 'hash/hash_wrapper.cpp')
-rw-r--r--hash/hash_wrapper.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/hash/hash_wrapper.cpp b/hash/hash_wrapper.cpp
new file mode 100644
index 0000000..a4173b9
--- /dev/null
+++ b/hash/hash_wrapper.cpp
@@ -0,0 +1,14 @@
+#include "hash.h"
+
+#include <boost/python.hpp>
+using namespace boost::python;
+
+BOOST_PYTHON_MODULE(_hash)
+{
+ class_<Hash>("Hash")
+ .def("update", &Hash::update)
+ .def("crc32", &Hash::crc32)
+ .def("ed2k", &Hash::ed2k)
+ .def("md5", &Hash::md5)
+ .def("sha1", &Hash::sha1);
+}