File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -384,6 +384,15 @@ PYBIND11_MODULE(seal, m)
384
384
})
385
385
;
386
386
387
+ // serializable.h
388
+ py::class_<Serializable<GaloisKeys>>(m, " Serializable<GaloisKeys>" )
389
+ .def (" save" , [](const Serializable<GaloisKeys> &gk, const std::string &path){
390
+ std::ofstream out (path, std::ofstream::binary);
391
+ gk.save (out);
392
+ out.close ();
393
+ })
394
+ ;
395
+
387
396
// keygenerator.h
388
397
py::class_<KeyGenerator>(m, " KeyGenerator" )
389
398
.def (py::init<const SEALContext &>())
@@ -407,7 +416,11 @@ PYBIND11_MODULE(seal, m)
407
416
GaloisKeys gk;
408
417
keygen.create_galois_keys (gk);
409
418
return gk;
410
- });
419
+ })
420
+ .def (" create_serializable_galois_keys" , [](KeyGenerator &keygen){
421
+ return keygen.create_galois_keys ();
422
+ })
423
+ ;
411
424
412
425
// encryptor.h
413
426
py::class_<Encryptor>(m, " Encryptor" )
You can’t perform that action at this time.
0 commit comments