| 327 | } |
| 328 | |
| 329 | EncryptedData CryptoModule::encrypt( |
| 330 | const std::string &targetDeviceId, |
| 331 | const std::string &content) { |
| 332 | if (!this->hasSessionFor(targetDeviceId)) { |
| 333 | throw std::runtime_error{SESSION_DOES_NOT_EXIST_ERROR}; |
| 334 | } |
| 335 | return this->sessions.at(targetDeviceId)->encrypt(content); |
| 336 | } |
| 337 | |
| 338 | std::string CryptoModule::decrypt( |
| 339 | const std::string &targetDeviceId, |
nothing calls this directly
no test coverage detected