| 174 | } |
| 175 | |
| 176 | void 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 | } |
| 187 | void TenSEALContext::encrypt_zero(Ciphertext& destination) const { |
| 188 | switch (this->_encryption_type) { |
| 189 | case encryption_type::asymmetric: |