/************************************************* * Boost.Python module definition * * (C) 1999-2006 The Botan Project * *************************************************/ #include using namespace Botan; #include namespace python = boost::python; extern void export_block_ciphers(); extern void export_stream_ciphers(); extern void export_hash_functions(); extern void export_macs(); 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_block_ciphers(); export_stream_ciphers(); export_hash_functions(); export_macs(); export_filters(); export_pk(); export_x509(); }