/foundation/distributeddatamgr/relational_store/frameworks/native/rdb/src/ |
H A D | rd_utils.cpp | 462 const char *RdUtils::GetEncryptKey(const std::vector<uint8_t> &encryptedKey, char outBuff[], size_t outBufSize) in GetEncryptKey() argument 465 for (size_t i = 0; i < encryptedKey.size(); i++) { in GetEncryptKey() 468 errno_t err = snprintf_s(buffer, outBufSize - i * 2, outBufSize - i * 2, "%02x", encryptedKey[i]); in GetEncryptKey() 476 int RdUtils::RdDbBackup(GRD_DB *db, const char *backupDbFile, const std::vector<uint8_t> &encryptedKey) in RdDbBackup() argument 484 const size_t keySize = encryptedKey.size() * 2 + 1; // 2 hex number can represent a uint8_t, 1 is for '/0' in RdDbBackup() 487 info.hexPassword = (encryptedKey.size() > 0) ? GetEncryptKey(encryptedKey, key, keySize) : nullptr; in RdDbBackup() 497 int RdUtils::RdDbRestore(GRD_DB *db, const char *backupDbFile, const std::vector<uint8_t> &encryptedKey) in RdDbRestore() argument 505 const size_t keySize = encryptedKey.size() * 2 + 1; // 2 hex number can represent a uint8_t, 1 is for '/0' in RdDbRestore() 508 info.hexPassword = (encryptedKey in RdDbRestore() 518 RdDbRekey(const char *dbFile, const char *configStr, const std::vector<uint8_t> &encryptedKey) RdDbRekey() argument [all...] |
H A D | rdb_security_manager.cpp | 302 std::vector<uint8_t> encryptedKey(plainKey.size * TIMES + 1);
in EncryptWorkKey() 303 struct HksBlob cipherText = { uint32_t(encryptedKey.size()), encryptedKey.data() };
in EncryptWorkKey() 307 encryptedKey.assign(encryptedKey.size(), 0);
in EncryptWorkKey() 311 encryptedKey.resize(cipherText.size);
in EncryptWorkKey() 312 return encryptedKey;
in EncryptWorkKey()
|
/foundation/distributeddatamgr/relational_store/frameworks/native/rdb/include/ |
H A D | rd_utils.h | 64 static const char *GetEncryptKey(const std::vector<uint8_t> &encryptedKey, char outBuff[], size_t outBufSize); 65 static int RdDbBackup(GRD_DB *db, const char *backupDbFile, const std::vector<uint8_t> &encryptedKey); 66 static int RdDbRestore(GRD_DB *db, const char *backupDbFile, const std::vector<uint8_t> &encryptedKey); 67 static int RdDbRekey(const char *dbFile, const char *configStr, const std::vector<uint8_t> &encryptedKey);
|
/foundation/filemanagement/storage_service/services/storage_daemon/mock/ |
H A D | base_key_mock.cpp | 97 KeyBlob &encryptedKey) in EncryptKeyBlob() 102 return IBaseKeyMoc::baseKeyMoc->EncryptKeyBlob(auth, keyPath, planKey, encryptedKey); in EncryptKeyBlob() 96 EncryptKeyBlob(const UserAuth &auth, const std::string &keyPath, KeyBlob &planKey, KeyBlob &encryptedKey) EncryptKeyBlob() argument
|
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/gaussdb_rd/include/grd_base/ |
H A D | grd_db_api.h | 29 GRD_API int32_t GRD_DBBackup(GRD_DB *db, const char *backupDbFile, uint8_t *encryptedKey, uint32_t encryptedKeyLen);
|
/foundation/filemanagement/storage_service/services/storage_daemon/crypto/src/ |
H A D | fscrypt_key_v1.cpp | 281 KeyBlob encryptedKey(AES_256_HASH_RANDOM_SIZE + GCM_MAC_BYTES + GCM_NONCE_BYTES); in EncryptClassE() 282 if (!EncryptKeyBlob(auth, dir_ + PATH_LATEST, eSecretFBE, encryptedKey)) { in EncryptClassE() 293 if (!fscryptV1Ext.WriteClassE(status, encryptedKey.data.get(), encryptedKey.size)) { in EncryptClassE() 297 encryptedKey.Clear(); in EncryptClassE()
|
H A D | base_key.cpp | 920 KeyBlob &encryptedKey) in StoreKey() 945 CombKeyBlob(keyCtx.rndEnc, keyCtx.nonce, encryptedKey); in StoreKey() 919 EncryptKeyBlob(const UserAuth &auth, const std::string &keyPath, KeyBlob &planKey, KeyBlob &encryptedKey) StoreKey() argument
|
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/crypto/src/ |
H A D | crypto_manager.cpp | 165 std::vector<uint8_t> encryptedKey(cipherText.data, cipherText.data + cipherText.size); in Encrypt() 167 return encryptedKey; in Encrypt()
|
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/gaussdb_rd/src/executor/base/ |
H A D | grd_db_api.cpp | 53 GRD_API int32_t GRD_DBBackup(GRD_DB *db, const char *backupDbFile, uint8_t *encryptedKey, uint32_t encryptedKeyLen) in GRD_DBBackup() argument
|
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/src/gaussdb_rd/ |
H A D | rd_utils.h | 46 int RdBackup(GRD_DB *db, const char *backupDbFile, uint8_t *encryptedKey, uint32_t encryptedKeyLen);
|
H A D | rd_utils.cpp | 151 int RdBackup(GRD_DB *db, const char *backupDbFile, uint8_t *encryptedKey, uint32_t encryptedKeyLen) in RdBackup() argument 153 return TransferGrdErrno(GRD_DBBackup(db, backupDbFile, encryptedKey, encryptedKeyLen)); in RdBackup()
|
H A D | rd_single_ver_natural_store.cpp | 273 uint8_t *encryptedKey = const_cast<uint8_t*>(passwd.GetData()); in Export() local 275 errCode = handle->Backup(filePath, encryptedKey, encryptedKeyLen); in Export()
|
H A D | rd_single_ver_storage_executor.cpp | 281 int RdSingleVerStorageExecutor::Backup(const std::string &filePath, uint8_t *encryptedKey, uint32_t encryptedKeyLen) in Backup() argument 283 return RdBackup(db_, filePath.c_str(), encryptedKey, encryptedKeyLen); in Backup()
|
H A D | rd_single_ver_storage_executor.h | 55 int Backup(const std::string &filePath, uint8_t *encryptedKey, uint32_t encryptedKeyLen);
|
/foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/kvdb/src/ |
H A D | security_manager.cpp | 236 std::vector<uint8_t> encryptedKey(cipherText.data, cipherText.data + cipherText.size); in Encrypt() 238 return encryptedKey; in Encrypt()
|
/foundation/filemanagement/storage_service/services/storage_daemon/include/crypto/ |
H A D | base_key.h | 64 bool EncryptKeyBlob(const UserAuth &auth, const std::string &keyPath, KeyBlob &planKey, KeyBlob &encryptedKey);
|