diff options
Diffstat (limited to 'doc/python/src/base.cpp')
-rw-r--r-- | doc/python/src/base.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/doc/python/src/base.cpp b/doc/python/src/base.cpp new file mode 100644 index 000000000..33457fe61 --- /dev/null +++ b/doc/python/src/base.cpp @@ -0,0 +1,31 @@ +/************************************************* +* Wrappers for basic Botan types * +* (C) 2005-2006 Jack Lloyd <[email protected]> * +*************************************************/ + +#include <boost/python.hpp> +using namespace boost::python; + +#include <botan/init.h> +#include <botan/symkey.h> +using namespace Botan; + +void export_basic_types() + { + class_<LibraryInitializer>("LibraryInitializer") + .def(init< optional<std::string> >()); + + class_<OctetString>("OctetString") + .def(init< optional<std::string> >()) + .def("as_string", &OctetString::as_string) + .def("length", &OctetString::length) + .def(self ^= self); + + class_<SymmetricKey, bases<OctetString> >("SymmetricKey") + .def(init< optional<std::string> >()) + .def(init< u32bit >()); + + class_<InitializationVector, bases<OctetString> >("InitializationVector") + .def(init< optional<std::string> >()) + .def(init< u32bit >()); + } |