MCPcopy Create free account
hub / github.com/CommE2E/comm / encrypt

Method encrypt

native/cpp/CommonCpp/CryptoTools/CryptoModule.cpp:329–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327}
328
329EncryptedData 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
338std::string CryptoModule::decrypt(
339 const std::string &targetDeviceId,

Callers

nothing calls this directly

Calls 2

hasSessionForMethod · 0.95
encryptMethod · 0.65

Tested by

no test coverage detected