Differential D7383 Diff 27204 native/cpp/CommonCpp/Notifications/BackgroundDataStorage/NotificationsCryptoModule.h
Changeset View
Changeset View
Standalone View
Standalone View
native/cpp/CommonCpp/Notifications/BackgroundDataStorage/NotificationsCryptoModule.h
#pragma once | #pragma once | ||||
#include "../../CryptoTools/CryptoModule.h" | #include "../../CryptoTools/CryptoModule.h" | ||||
#include <string> | #include <string> | ||||
namespace comm { | namespace comm { | ||||
class NotificationsCryptoModule { | class NotificationsCryptoModule { | ||||
const static std::string secureStoreNotificationsAccountDataKey; | const static std::string secureStoreNotificationsAccountDataKey; | ||||
const static std::string notificationsCryptoAccountID; | const static std::string notificationsCryptoAccountID; | ||||
const static std::string keyserverHostedNotificationsID; | |||||
const static std::string initialEncryptedMessageContent; | |||||
static void serializeAndFlushCryptoModule( | static void serializeAndFlushCryptoModule( | ||||
crypto::CryptoModule &cryptoModule, | crypto::CryptoModule &cryptoModule, | ||||
const std::string &path, | const std::string &path, | ||||
const std::string &picklingKey, | const std::string &picklingKey, | ||||
const std::string &callingProcessName); | const std::string &callingProcessName); | ||||
static crypto::CryptoModule deserializeCryptoModule( | static crypto::CryptoModule deserializeCryptoModule( | ||||
const std::string &path, | const std::string &path, | ||||
const std::string &picklingKey); | const std::string &picklingKey); | ||||
static void callCryptoModule( | |||||
std::function<void(crypto::CryptoModule &cryptoModule)> caller, | |||||
const std::string &callingProcessName); | |||||
public: | public: | ||||
static void | static void | ||||
initializeNotificationsCryptoAccount(const std::string &callingProcessName); | initializeNotificationsCryptoAccount(const std::string &callingProcessName); | ||||
static void clearSensitiveData(); | static void clearSensitiveData(); | ||||
static std::string getNotificationsIdentityKeys(); | static std::string | ||||
getNotificationsIdentityKeys(const std::string &callingProcessName); | |||||
static crypto::EncryptedData initializeNotificationsSession( | |||||
const std::string &identityKeys, | |||||
const std::string &prekey, | |||||
const std::string &prekeySignature, | |||||
const std::string &oneTimeKeys, | |||||
const std::string &callingProcessName); | |||||
static bool | |||||
isNotificationsSessionInitialized(const std::string &callingProcessName); | |||||
}; | }; | ||||
} // namespace comm | } // namespace comm |