mirror of
https://github.com/oxen-io/oxen-pyoxenmq.git
synced 2023-12-13 20:50:34 +01:00
a98722a7da
- Wrap much more of the OxenMQ - Add extensive pydoc to everything - Switch setup.py to pybind's built-in tools
16 lines
333 B
C++
16 lines
333 B
C++
#include "common.hpp"
|
|
#include "oxenmq/base32z.h"
|
|
|
|
namespace oxenmq {
|
|
|
|
void BEncode_Init(py::module& mod) {
|
|
mod.def("base32z_encode", [](py::bytes data) {
|
|
char* ptr = nullptr;
|
|
py::ssize_t sz = 0;
|
|
PyBytes_AsStringAndSize(data.ptr(), &ptr, &sz);
|
|
return oxenmq::to_base32z(ptr, ptr+sz);
|
|
});
|
|
}
|
|
|
|
}
|