Home
last modified time | relevance | path

Searched refs:BaseKey (Results 1 – 12 of 12) sorted by relevance

/ohos5.0/foundation/filemanagement/storage_service/services/storage_daemon/mock/
H A Dbase_key_mock.cpp25 BaseKey::BaseKey(const std::string &dir, uint8_t keyLen) : dir_(dir), keyLen_(keyLen), in BaseKey() function in BaseKey
30 bool BaseKey::InitKey(bool needGenerateKey) in InitKey()
39 bool BaseKey::StoreKey(const UserAuth &auth, bool needGenerateShield) in StoreKey()
47 bool BaseKey::StoreKey(const UserAuth &auth) in StoreKey()
56 bool BaseKey::ClearKey(const std::string &mnt) in ClearKey()
72 bool BaseKey::RestoreKey(const UserAuth &auth, bool needSyncCandidate) in RestoreKey()
80 bool BaseKey::UpgradeKeys() in UpgradeKeys()
106 bool BaseKey::RenameKeyPath(const std::string &keyPath) in RenameKeyPath()
114 bool BaseKey::KeyDescIsEmpty() in KeyDescIsEmpty()
122 void BaseKey::WipingActionDir(std::string &path) in WipingActionDir()
[all …]
/ohos5.0/foundation/filemanagement/storage_service/services/storage_daemon/crypto/src/
H A Dbase_key.cpp66 BaseKey::BaseKey(const std::string &dir, uint8_t keyLen) : dir_(dir), keyLen_(keyLen), in BaseKey() function in OHOS::StorageDaemon::BaseKey
84 bool BaseKey::InitKey(bool needGenerateKey) in InitKey()
154 int BaseKey::GetCandidateVersion() const in GetCandidateVersion()
174 std::string BaseKey::GetCandidateDir() const in GetCandidateDir()
268 bool BaseKey::CheckAndUpdateVersion() in StoreKey()
405 void BaseKey::DoLatestBackUp() const in StoreKey()
856 void BaseKey::SyncKeyDir() const in StoreKey()
873 bool BaseKey::UpgradeKeys() in StoreKey()
1053 uint32_t BaseKey::GetTypeFromDir() in StoreKey()
1093 uint32_t BaseKey::GetIdFromDir() in StoreKey()
[all …]
H A Dkey_manager.cpp51 std::shared_ptr<BaseKey> KeyManager::GetBaseKey(const std::string& dir) in GetBaseKey()
60 return std::dynamic_pointer_cast<BaseKey>(std::make_shared<FscryptKeyV2>(dir)); in GetBaseKey()
66 return std::dynamic_pointer_cast<BaseKey>(std::make_shared<FscryptKeyV1>(dir)); in GetBaseKey()
706 std::shared_ptr<BaseKey> elKey = GetBaseKey(elPath); in DoDeleteUserCeEceSeceKeys()
837 std::shared_ptr<BaseKey> el5Key = GetUserElKey(user, EL5_KEY); in UpdateESecret()
893 std::shared_ptr<BaseKey> item = GetUserElKey(user, type); in UpdateCeEceSeceUserAuth()
1037 std::shared_ptr<BaseKey> KeyManager::GetUserElKey(unsigned int user, KeyType type) in UpdateCeEceSeceUserAuth()
1040 std::shared_ptr<BaseKey> elKey = nullptr; in UpdateCeEceSeceUserAuth()
1117 std::shared_ptr<BaseKey> elKey = GetBaseKey(keyDir); in UpdateCeEceSeceUserAuth()
1638 std::shared_ptr<BaseKey> elKey = GetUserElKey(userId, type); in UpdateCeEceSeceUserAuth()
[all …]
H A Dcrypto_delay_handler.cpp47 void DelayHandler::StartDelayTask(std::shared_ptr<BaseKey> &elKey) in StartDelayTask()
H A Dkey_backup.cpp109 int32_t KeyBackup::TryRestoreKey(const std::shared_ptr<BaseKey> &baseKey, const UserAuth &auth) in TryRestoreKey()
134 int32_t KeyBackup::TryRestoreUeceKey(const std::shared_ptr<BaseKey> &baseKey, in TryRestoreUeceKey()
206 int32_t KeyBackup::DoResotreKeyMix(std::shared_ptr<BaseKey> &baseKey, const UserAuth &auth, const s… in DoResotreKeyMix()
/ohos5.0/foundation/filemanagement/storage_service/services/storage_daemon/include/crypto/
H A Dkey_manager.h124 bool ResetESecret(unsigned int user, std::shared_ptr<BaseKey> &elKey);
125 std::shared_ptr<BaseKey> GetBaseKey(const std::string& dir);
126 std::shared_ptr<BaseKey> GetUserElKey(unsigned int user, KeyType type);
127 void SaveUserElKey(unsigned int user, KeyType type, std::shared_ptr<BaseKey> elKey);
136 const std::vector<uint8_t> &secret, std::shared_ptr<BaseKey> elKey);
152 std::map<unsigned int, std::shared_ptr<BaseKey>> userEl1Key_;
153 std::map<unsigned int, std::shared_ptr<BaseKey>> userEl2Key_;
154 std::map<unsigned int, std::shared_ptr<BaseKey>> userEl3Key_;
155 std::map<unsigned int, std::shared_ptr<BaseKey>> userEl4Key_;
156 std::map<unsigned int, std::shared_ptr<BaseKey>> userEl5Key_;
[all …]
H A Dbase_key.h35 class BaseKey : public std::enable_shared_from_this<BaseKey> {
37 BaseKey() = delete;
38 BaseKey(const std::string &dir, uint8_t keyLen = CRYPTO_AES_256_XTS_KEY_SIZE);
39 ~BaseKey() = default;
H A Dcrypto_delay_handler.h35 void StartDelayTask(std::shared_ptr<BaseKey> &elKey);
46 std::shared_ptr<BaseKey> el4Key_;
H A Dfscrypt_key_v2.h24 class FscryptKeyV2 final : public BaseKey {
27 …FscryptKeyV2(const std::string &dir, uint8_t keyLen = CRYPTO_AES_256_XTS_KEY_SIZE) : BaseKey(dir, …
H A Dkey_backup.h46 int32_t TryRestoreKey(const std::shared_ptr<BaseKey> &baseKey, const UserAuth &auth);
47 int32_t TryRestoreUeceKey(const std::shared_ptr<BaseKey> &baseKey,
90 …int32_t DoResotreKeyMix(std::shared_ptr<BaseKey> &baseKey, const UserAuth &auth, const std::string…
H A Dfscrypt_key_v1.h25 class FscryptKeyV1 final : public BaseKey {
28 …FscryptKeyV1(const std::string &dir, uint8_t keyLen = CRYPTO_AES_256_XTS_KEY_SIZE) : BaseKey(dir, …
/ohos5.0/foundation/filemanagement/storage_service/services/storage_daemon/crypto/test/key_manager_test/
H A Dkey_manager_test.cpp281 …std::shared_ptr<BaseKey> tmpKey = std::dynamic_pointer_cast<BaseKey>(std::make_shared<FscryptKeyV2…
358 …std::shared_ptr<BaseKey> elKey = std::dynamic_pointer_cast<BaseKey>(std::make_shared<FscryptKeyV2>…
428 …std::shared_ptr<BaseKey> tmpKey = std::dynamic_pointer_cast<BaseKey>(std::make_shared<FscryptKeyV2…
481 …std::shared_ptr<BaseKey> tmpKey = std::dynamic_pointer_cast<BaseKey>(std::make_shared<FscryptKeyV2…
1103 std::map<unsigned int, std::shared_ptr<BaseKey>> userElxKey_;