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

Method exposePublicIdentityKeys

native/cpp/CommonCpp/CryptoTools/CryptoModule.cpp:32–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32void CryptoModule::exposePublicIdentityKeys() {
33 if (!this->keys.identityKeys.empty()) {
34 return;
35 }
36
37 std::string ed25519 = std::string(this->vodozemacAccount->ed25519_key());
38 std::string curve25519 =
39 std::string(this->vodozemacAccount->curve25519_key());
40
41 // Format as JSON: {"ed25519":"...","curve25519":"..."}
42 folly::dynamic identityKeys =
43 folly::dynamic::object("ed25519", ed25519)("curve25519", curve25519);
44
45 this->keys.identityKeys = folly::toJson(identityKeys);
46}
47
48void CryptoModule::generateOneTimeKeys(size_t oneTimeKeysAmount) {
49 try {

Callers 1

getIdentityKeysMethod · 0.95

Calls 3

emptyMethod · 0.45
ed25519_keyMethod · 0.45
curve25519_keyMethod · 0.45

Tested by

no test coverage detected