Home
last modified time | relevance | path

Searched refs:keyDesc (Results 1 - 8 of 8) sorted by relevance

/foundation/filemanagement/storage_service/services/storage_daemon/crypto/src/
H A Dfscrypt_key_v1.cpp73 bool FscryptKeyV1::GenerateAppkey(uint32_t userId, uint32_t hashId, std::string &keyDesc) in GenerateAppkey() argument
83 keyDesc = ""; in GenerateAppkey()
95 keyDesc = keyInfo_.keyDesc.ToString(); in GenerateAppkey()
96 keyInfo_.keyDesc.Clear(); in GenerateAppkey()
122 std::string keyref = prefix + ":" + keyInfo_.keyDesc.ToString(); in InstallKeyForAppKeyToKeyring()
323 std::string keyref = prefix + ":" + keyInfo_.keyDesc.ToString(); in InstallKeyToKeyring()
333 if (!SaveKeyBlob(keyInfo_.keyDesc, dir_ + PATH_KEYDESC)) { in InstallKeyToKeyring()
367 std::string keyref = prefix + ":" + keyInfo_.keyDesc.ToString(); in InstallEceSeceKeyToKeyring()
375 if (!SaveKeyBlob(keyInfo_.keyDesc, dir in InstallEceSeceKeyToKeyring()
[all...]
H A Drecover_manager.cpp126 KeyBlob keyDesc; in SetRecoverKey() local
128 if (!GenerateKeyDesc(ivBlob, keyDesc)) { in SetRecoverKey()
132 if (!InstallKeyDescToKeyring(ELX_TYPE_ARR[i], key2Blob, keyDesc)) { in SetRecoverKey()
134 keyDesc.Clear(); in SetRecoverKey()
140 keyDesc.Clear(); in SetRecoverKey()
238 bool RecoveryManager::GenerateKeyDesc(const KeyBlob &ivBlob, KeyBlob &keyDesc) in GenerateKeyDesc() argument
258 keyDesc.Alloc(CRYPTO_KEY_DESC_SIZE); in GenerateKeyDesc()
259 auto err = memcpy_s(keyDesc.data.get(), keyDesc.size, keyRef2, CRYPTO_KEY_DESC_SIZE); in GenerateKeyDesc()
268 bool RecoveryManager::InstallKeyDescToKeyring(size_t keyType, const KeyBlob &key2Blob, const KeyBlob &keyDesc) in InstallKeyDescToKeyring() argument
291 InstallDeCe(const KeyBlob &key2Blob, const KeyBlob &keyDesc) InstallDeCe() argument
324 InstallEceSece(uint32_t sdpClass, const KeyBlob &key2Blob, const KeyBlob &keyDesc) InstallEceSece() argument
[all...]
H A Dbase_key.cpp1147 return keyInfo_.keyDesc.IsEmpty(); in StoreKey()
/foundation/filemanagement/storage_service/services/storage_daemon/include/crypto/
H A Drecover_manager.h93 bool InstallKeyDescToKeyring(size_t keyType, const KeyBlob &key2Blob, const KeyBlob &keyDesc);
94 bool InstallDeCe(const KeyBlob &key2Blob, const KeyBlob &keyDesc);
95 bool InstallEceSece(uint32_t sdpClass, const KeyBlob &key2Blob, const KeyBlob &keyDesc);
H A Dkey_blob.h148 KeyBlob keyDesc; member
/foundation/filemanagement/storage_service/services/storage_daemon/libfscrypt/src/
H A Dfscrypt_control.c313 char keyDesc[FSCRYPT_KEY_DESCRIPTOR_SIZE] = {0}; in SetPolicyLegacy() local
314 int ret = ReadKeyFile(keyDescPath, keyDesc, FSCRYPT_KEY_DESCRIPTOR_SIZE); in SetPolicyLegacy()
320 FSCRYPT_KEY_DESCRIPTOR_SIZE, keyDesc, FSCRYPT_KEY_DESCRIPTOR_SIZE); in SetPolicyLegacy()
412 static int ActSetFileXattrActSetFileXattr(const char *path, char *keyDesc, int storageType) in ActSetFileXattrActSetFileXattr() argument
421 int ret = memcpy_s((char *)PolicySDP.masterKeyDescriptor, FS_KEY_DESC_SIZE, (char *)keyDesc, in ActSetFileXattrActSetFileXattr()
465 char keyDesc[FSCRYPT_KEY_DESCRIPTOR_SIZE] = {0}; in LoadAndSetEceAndSecePolicy() local
466 ret = ReadKeyFile(pathBuf, keyDesc, FSCRYPT_KEY_DESCRIPTOR_SIZE); in LoadAndSetEceAndSecePolicy()
470 ret = ActSetFileXattrActSetFileXattr(dir, keyDesc, type); in LoadAndSetEceAndSecePolicy()
/foundation/filemanagement/storage_service/services/storage_daemon/crypto/test/fscrypt_v1_test/
H A Dfscrypt_key_v1_test.cpp270 std::string keyDesc = "test"; in HWTEST_F() local
273 EXPECT_FALSE(g_testKeyV1->GenerateAppkey(userId, hashId, keyDesc)); in HWTEST_F()
276 EXPECT_TRUE(g_testKeyV1->GenerateAppkey(userId, hashId, keyDesc)); in HWTEST_F()
299 g_testKeyV1->keyInfo_.keyDesc.Clear(); in HWTEST_F()
325 g_testKeyV1->keyInfo_.keyDesc.Clear(); in HWTEST_F()
330 g_testKeyV1->keyInfo_.keyDesc.Clear(); in HWTEST_F()
332 g_testKeyV1->keyInfo_.keyDesc.Alloc(TEST_KEYID_SIZE); in HWTEST_F()
/foundation/filemanagement/storage_service/services/storage_daemon/crypto/test/
H A Dcrypto_key_test.cpp369 EXPECT_FALSE(g_testKeyV1->keyInfo_.keyDesc.IsEmpty()); in HWTEST_F()
414 (void)memcpy_s(arg.v1.master_key_descriptor, FSCRYPT_KEY_DESCRIPTOR_SIZE, g_testKeyV1->keyInfo_.keyDesc.data.get(), in HWTEST_F()
415 g_testKeyV1->keyInfo_.keyDesc.size); in HWTEST_F()
488 EXPECT_TRUE(g_testKeyV2->keyInfo_.keyDesc.IsEmpty()); in HWTEST_F()

Completed in 8 milliseconds