MCPcopy Create free account
hub / github.com/OpenMined/TenSEAL / encrypt

Method encrypt

tenseal/cpp/context/tensealcontext.cpp:176–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176void TenSEALContext::encrypt(const Plaintext& plain,
177 Ciphertext& destination) const {
178 switch (this->_encryption_type) {
179 case encryption_type::asymmetric:
180 return this->encryptor()->encrypt(plain, destination);
181 case encryption_type::symmetric:
182 return this->encryptor()->encrypt_symmetric(plain, destination);
183 default:
184 throw invalid_argument("invalid encryption type");
185 }
186}
187void TenSEALContext::encrypt_zero(Ciphertext& destination) const {
188 switch (this->_encryption_type) {
189 case encryption_type::asymmetric:

Callers

nothing calls this directly

Calls 1

encryptorMethod · 0.95

Tested by

no test coverage detected