Home
last modified time | relevance | path

Searched refs:encryptedKey (Results 1 - 16 of 16) sorted by relevance

/foundation/distributeddatamgr/relational_store/frameworks/native/rdb/src/
H A Drd_utils.cpp462 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 Drdb_security_manager.cpp302 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 Drd_utils.h64 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 Dbase_key_mock.cpp97 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 Dgrd_db_api.h29 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 Dfscrypt_key_v1.cpp281 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 Dbase_key.cpp920 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 Dcrypto_manager.cpp165 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 Dgrd_db_api.cpp53 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 Drd_utils.h46 int RdBackup(GRD_DB *db, const char *backupDbFile, uint8_t *encryptedKey, uint32_t encryptedKeyLen);
H A Drd_utils.cpp151 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 Drd_single_ver_natural_store.cpp273 uint8_t *encryptedKey = const_cast<uint8_t*>(passwd.GetData()); in Export() local
275 errCode = handle->Backup(filePath, encryptedKey, encryptedKeyLen); in Export()
H A Drd_single_ver_storage_executor.cpp281 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 Drd_single_ver_storage_executor.h55 int Backup(const std::string &filePath, uint8_t *encryptedKey, uint32_t encryptedKeyLen);
/foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/kvdb/src/
H A Dsecurity_manager.cpp236 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 Dbase_key.h64 bool EncryptKeyBlob(const UserAuth &auth, const std::string &keyPath, KeyBlob &planKey, KeyBlob &encryptedKey);

Completed in 12 milliseconds