/************************************************* * Boost.Python module definition * * (C) 1999-2006 The Botan Project * *************************************************/ #include using namespace Botan; #include namespace python = boost::python; extern void export_basic_algos(); extern void export_filters(); extern void export_pk(); extern void export_x509(); BOOST_PYTHON_MODULE(_botan) { python::class_("LibraryInitializer") .def(python::init< python::optional >()); python::class_("OctetString") .def(python::init< python::optional >()) .def(python::init< u32bit >()) .def("__str__", &OctetString::as_string) .def("__len__", &OctetString::length); python::enum_("cipher_dir") .value("encryption", ENCRYPTION) .value("decryption", DECRYPTION); export_basic_algos(); export_filters(); export_pk(); export_x509(); }