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

Method getUnpublishedPrekey

native/cpp/CommonCpp/CryptoTools/CryptoModule.cpp:177–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177std::optional<std::string> CryptoModule::getUnpublishedPrekey() {
178 try {
179 std::string unpublished =
180 std::string(this->vodozemacAccount->unpublished_prekey());
181 // NOTE: We use an empty string to represent None because cxx doesn't
182 // support Option<&str> in FFI function signatures.
183 if (unpublished.empty()) {
184 return std::nullopt;
185 }
186 return unpublished;
187 } catch (const std::exception &e) {
188 throw std::runtime_error(
189 "error getUnpublishedPrekey => " + std::string(e.what()));
190 }
191}
192
193std::string CryptoModule::generateAndGetPrekey() {
194 try {

Callers 3

validateAndGetPrekeysMethod · 0.80

Calls 2

unpublished_prekeyMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected