Page MenuHomePhabricator

D9085.id30982.diff
No OneTemporary

D9085.id30982.diff

diff --git a/native/cpp/CommonCpp/Notifications/BackgroundDataStorage/NotificationsCryptoModule.h b/native/cpp/CommonCpp/Notifications/BackgroundDataStorage/NotificationsCryptoModule.h
--- a/native/cpp/CommonCpp/Notifications/BackgroundDataStorage/NotificationsCryptoModule.h
+++ b/native/cpp/CommonCpp/Notifications/BackgroundDataStorage/NotificationsCryptoModule.h
@@ -34,6 +34,9 @@
generateAndGetNotificationsPrekey(const std::string &callingProcessName);
static std::string
getNotificationsPrekeySignature(const std::string &callingProcessName);
+ static std::string getNotificationsOneTimeKeys(
+ const size_t oneTimeKeysAmount,
+ const std::string &callingProcessName);
static crypto::EncryptedData initializeNotificationsSession(
const std::string &identityKeys,
const std::string &prekey,
diff --git a/native/cpp/CommonCpp/Notifications/BackgroundDataStorage/NotificationsCryptoModule.cpp b/native/cpp/CommonCpp/Notifications/BackgroundDataStorage/NotificationsCryptoModule.cpp
--- a/native/cpp/CommonCpp/Notifications/BackgroundDataStorage/NotificationsCryptoModule.cpp
+++ b/native/cpp/CommonCpp/Notifications/BackgroundDataStorage/NotificationsCryptoModule.cpp
@@ -213,6 +213,18 @@
return prekeySignature;
}
+std::string NotificationsCryptoModule::getNotificationsOneTimeKeys(
+ const size_t oneTimeKeysAmount,
+ const std::string &callingProcessName) {
+ std::string oneTimeKeys;
+ auto caller = [&oneTimeKeys,
+ oneTimeKeysAmount](crypto::CryptoModule cryptoModule) {
+ oneTimeKeys = cryptoModule.getOneTimeKeys(oneTimeKeysAmount);
+ };
+ NotificationsCryptoModule::callCryptoModule(caller, callingProcessName);
+ return oneTimeKeys;
+}
+
crypto::EncryptedData NotificationsCryptoModule::initializeNotificationsSession(
const std::string &identityKeys,
const std::string &prekey,

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 27, 4:37 AM (16 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2587474
Default Alt Text
D9085.id30982.diff (1 KB)

Event Timeline