| 30 | } |
| 31 | |
| 32 | void 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 | |
| 48 | void CryptoModule::generateOneTimeKeys(size_t oneTimeKeysAmount) { |
| 49 | try { |
no test coverage detected