Browse Source

Add missing functions in serialization header

Erik Takke 1 year ago
parent
commit
787c8178cb
1 changed files with 13 additions and 0 deletions
  1. 13 0
      src/include/pke/serialization.h

+ 13 - 0
src/include/pke/serialization.h

@@ -33,6 +33,7 @@
 #include "bindings.h"
 
 using namespace lbcrypto;
+namespace py = pybind11;
 
 template <typename ST>
 bool SerializeEvalMultKeyWrapper(const std::string& filename, const ST& sertype, std::string id);
@@ -43,4 +44,16 @@ bool SerializeEvalAutomorphismKeyWrapper(const std::string& filename, const ST&
 template <typename ST>
 bool DeserializeEvalMultKeyWrapper(const std::string& filename, const ST& sertype);
 
+template <typename T, typename ST>
+std::string SerializeToStringWrapper(const T& obj, const ST& sertype);
+
+template <typename T, typename ST>
+py::bytes SerializeToBytesWrapper(const T& obj, const ST& sertype);
+
+template <typename T, typename ST>
+T DeserializeFromStringWrapper(const std::string& str, const ST& sertype);
+
+template <typename T, typename ST>
+T DeserializeFromBytesWrapper(const py::bytes& bytes, const ST& sertype);
+
 #endif // OPENFHE_SERIALIZATION_BINDINGS_H