Bläddra i källkod

Added InsertEvalAutomorphismKey()

Dmitriy Suponitskiy 11 månader sedan
förälder
incheckning
d7e2cf89ad
2 ändrade filer med 13 tillägg och 1 borttagningar
  1. 8 1
      src/include/docstrings/cryptocontext_docs.h
  2. 5 0
      src/lib/bindings.cpp

+ 8 - 1
src/include/docstrings/cryptocontext_docs.h

@@ -1117,12 +1117,19 @@ const char* cc_IntMPBootEncrypt_docs = R"pbdoc(
 )pbdoc";
 
 const char* cc_InsertEvalMultKey_docs = R"pbdoc(
-    InsertEvalMultKey - add the given vector of keys to the map, replacing the existing vector if there
+    Adds the given vector of keys to the map, replacing the existing vector if there
 
     :param evalKeyVec: vector of keys
     :type evalKeyVec: List[EvalKey]
 )pbdoc";
 
+const char* cc_InsertEvalAutomorphismKey_docs = R"pbdoc(
+    Add the given map of keys to the map, replacing the existing map if there is
+
+    :param evalKeyMap: map of keys
+    :type EvalKeyMap
+)pbdoc";
+
 const char* cc_EvalSum_docs = R"pbdoc(
     Function for evaluating a sum of all components in a vector.
 

+ 5 - 0
src/lib/bindings.cpp

@@ -749,6 +749,11 @@ void bind_crypto_context(py::module &m)
             cc_InsertEvalMultKey_docs,
             py::arg("evalKeyVec"),
             py::arg("keyTag") = "")
+        .def_static(
+            "InsertEvalAutomorphismKey", &CryptoContextImpl<DCRTPoly>::InsertEvalAutomorphismKey,
+            cc_InsertEvalAutomorphismKey_docs,
+            py::arg("evalKeyMap"),
+            py::arg("keyTag") = "")
         .def_static(
             "ClearEvalAutomorphismKeys", []()
             { CryptoContextImpl<DCRTPoly>::ClearEvalAutomorphismKeys(); },