Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3371318
D9085.id30982.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D9085.id30982.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D9085: [native] getNotificationsOneTimeKeys
Attached
Detach File
Event Timeline
Log In to Comment