/foundation/distributedhardware/device_manager/test/unittest/ |
H A D | UTTest_dm_crypto.cpp | 52 int32_t ret = Crypto::GetSecRandom(buffer, len); in HWTEST_F() 62 std::string salt = Crypto::GetSecSalt(); in HWTEST_F() 76 EXPECT_EQ(Crypto::GetUdidHash(UDID_SAMPLE, reinterpret_cast<uint8_t *>(udidHash)), DM_OK); in HWTEST_F() 90 std::string salt1 = Crypto::GetSecSalt(); in HWTEST_F() 91 std::string salt2 = Crypto::GetSecSalt(); in HWTEST_F() 93 std::string hash1 = Crypto::GetHashWithSalt(text1, salt1); in HWTEST_F() 94 std::string hash2 = Crypto::GetHashWithSalt(text1, salt2); in HWTEST_F() 100 std::string hash3 = Crypto::GetHashWithSalt(text1, salt1); in HWTEST_F() 101 std::string hash4 = Crypto::GetHashWithSalt(text2, salt1); in HWTEST_F() 106 std::string hash5 = Crypto in HWTEST_F() [all...] |
/foundation/distributedhardware/device_manager/utils/src/crypto/ |
H A D | dm_crypto.cpp | 91 std::string Crypto::Sha256(const std::string &text, bool isUpper) in Sha256() 96 std::string Crypto::Sha256(const void *data, size_t size, bool isUpper) in Sha256() 114 int32_t Crypto::GetUdidHash(const std::string &udid, unsigned char *udidHash) in GetUdidHash() 126 int32_t Crypto::ConvertHexStringToBytes(unsigned char *outBuf, uint32_t outBufLen, const char *inBuf, in ConvertHexStringToBytes() 166 std::string Crypto::GetGroupIdHash(const std::string &groupId) in GetGroupIdHash() 177 int32_t Crypto::GetSecRandom(uint8_t *out, size_t outLen) in GetSecRandom() 192 std::string Crypto::GetSecSalt() in GetSecSalt() 195 if (Crypto::GetSecRandom(out, SALT_LENGTH) != DM_OK) { in GetSecSalt() 207 std::string Crypto::GetHashWithSalt(const std::string &text, const std::string &salt) in GetHashWithSalt() 210 return Crypto in GetHashWithSalt() [all...] |
/foundation/distributedhardware/device_manager/test/commonunittest/ |
H A D | UTTest_dm_distributed_hardware_load.cpp | 75 std::shared_ptr<Crypto> crypto = std::make_shared<Crypto>(); in HWTEST_F() 93 auto ret = Crypto::GetUdidHash(deviceId, reinterpret_cast<uint8_t *>(deviceIdHash)); in HWTEST_F() 101 auto ret = Crypto::GetUdidHash(deviceId, udidHash); in HWTEST_F() 108 std::string str = Crypto::GetGroupIdHash(groupId); in HWTEST_F() 116 auto ret = Crypto::ConvertHexStringToBytes(outBuf, 0, inBuf, 0); in HWTEST_F()
|
H A D | UTTest_dm_auth_manager_second.cpp | 1430 authManager_->authResponseContext_->importAuthCode = Crypto::Sha256(authManager_->importAuthCode_); in HWTEST_F()
|
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/framework/utils/ |
H A D | crypto.cpp | 20 std::string Crypto::Sha256(const std::string &text, bool isUpper) in Sha256() 25 std::vector<uint8_t> Crypto::Random(int32_t len, int32_t minimum, int32_t maximum) in Random() 36 std::string Crypto::Sha256(const void *data, size_t size, bool isUpper) in Sha256()
|
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/framework/test/ |
H A D | crypto_test.cpp | 39 vector<uint8_t> randomNumbers = Crypto::Random(len, min, max);
in HWTEST_F()
|
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter/permission/test/unittest/ |
H A D | permission_validator_test.cpp | 68 EXPECT_NE(Crypto::Sha256("ohos"), userId); in HWTEST_F()
|
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/framework/include/utils/ |
H A D | crypto.h | 24 class Crypto { class
|
/foundation/distributedhardware/device_manager/utils/include/crypto/ |
H A D | dm_crypto.h | 25 class Crypto { class
|
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/app/src/checker/ |
H A D | bundle_checker.cpp | 113 return Crypto::Sha256(appId); in GetAppId()
|
/foundation/distributedhardware/device_manager/services/service/src/pinholder/ |
H A D | pin_holder_session.cpp | 160 Crypto::ConvertHexStringToBytes(addr.info.ble.udidHash, UDID_HASH_LEN, in GetAddrByTargetId()
|
H A D | pin_holder.cpp | 461 if (Crypto::GetUdidHash(deviceId, reinterpret_cast<uint8_t *>(udidHashTmp)) != DM_OK) { in GetPeerDeviceId()
|
/foundation/distributedhardware/device_manager/services/implementation/src/authentication/ |
H A D | dm_auth_manager.cpp | 410 if (Crypto::GetUdidHash(peerUdid, reinterpret_cast<uint8_t *>(udidHashTmp)) != DM_OK) { in GetPeerUdidHash() 797 authResponseContext_->importAuthCode = Crypto::Sha256(importAuthCode_); in AbilityNegotiate() 900 if (authResponseContext_->importAuthCode != Crypto::Sha256(importAuthCode_)) { in ProcessAuthRequest() 933 Crypto::GetUdidHash(authResponseContext_->localDeviceId, reinterpret_cast<uint8_t *>(deviceIdHash)); in GetAuthRequestContext() 1637 if ((*it) == Crypto::GetGroupIdHash(groupInfo.groupId)) { in IsIdenticalAccount() 1663 jsonAccountObj.push_back(Crypto::GetGroupIdHash(groupInfo.groupId)); in GetAccountGroupIdHash() 1744 Crypto::ConvertHexStringToBytes(addr.info.ble.udidHash, UDID_HASH_LEN, in ParseConnectAddr() 1850 Crypto::GetUdidHash(remoteDeviceId_, reinterpret_cast<uint8_t *>(deviceIdHash)); in GenerateBindResultContent() 2068 Crypto::GetUdidHash(localUdid, reinterpret_cast<uint8_t *>(mUdidHash)); in CompatiblePutAcl() 2166 jsonObject[TAG_IMPORT_AUTH_CODE] = Crypto in ProcRespNegotiate() [all...] |
/foundation/distributedhardware/device_manager/services/service/src/ |
H A D | device_manager_service.cpp | 353 if (Crypto::GetUdidHash(localDeviceId, reinterpret_cast<uint8_t *>(udidHash)) == DM_OK) { in GetLocalDeviceInfo() 1045 std::string appId = Crypto::Sha256(AppManager::GetInstance().GetAppId()); in GetEncryptedUuidByNetworkId() 1047 uuid = Crypto::Sha256(appId + "_" + uuid); in GetEncryptedUuidByNetworkId() 1059 encryptedUuid = Crypto::Sha256(appId + "_" + uuid); in GenerateEncryptedUuid() 1674 if (Crypto::GetAccountIdHash(accountId, reinterpret_cast<uint8_t *>(accountIdHash)) != DM_OK) { in HandleAccountLogout() 1818 int32_t ret = Crypto::ConvertUdidHashToAnoyAndSave(appId, udidHash, kvValue); in ConvertUdidHashToAnoyDeviceId()
|
H A D | device_manager_service_listener.cpp | 447 int32_t ret = Crypto::ConvertUdidHashToAnoyAndSave(appId, std::string(deviceInfo.deviceId), kvValue); in ConvertUdidHashToAnoyAndSave() 473 int32_t ret = Crypto::ConvertUdidHashToAnoyDeviceId(appId, udidHash, kvValue); in ConvertUdidHashToAnoyDeviceId()
|
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/udmf/preprocess/ |
H A D | preprocess_utils.cpp | 74 std::vector<uint8_t> randomDevices = DistributedData::Crypto::Random(ID_LEN, MINIMUM, MAXIMUM); in GenerateId()
|
/foundation/distributedhardware/device_manager/services/implementation/src/dependency/softbus/ |
H A D | softbus_connector.cpp | 579 if (Crypto::GetUdidHash(udid, reinterpret_cast<uint8_t *>(udidHash)) != DM_OK) { in GetDeviceUdidHashByUdid() 762 if (Crypto::GetUdidHash(deviceId, reinterpret_cast<uint8_t *>(deviceIdHash)) != DM_OK) { in GetDeviceInfoByDeviceId()
|
/foundation/distributedhardware/device_manager/services/softbuscache/src/ |
H A D | dm_softbus_cache.cpp | 129 if (Crypto::GetUdidHash(udid, reinterpret_cast<uint8_t *>(udidHash)) != DM_OK) { in SaveDeviceInfo()
|
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/app/src/ |
H A D | kvstore_meta_manager.cpp | 442 Crypto::Sha256(label_ + "_" + Bootstrap::GetInstance().GetMetaDBName()));
|
H A D | kvstore_data_service.cpp | 266 AccountDelegate::GetInstance()->RegisterHashFunc(Crypto::Sha256); in OnStart()
|
/foundation/distributedhardware/device_manager/services/implementation/src/devicestate/ |
H A D | dm_device_state_manager.cpp | 217 if (Crypto::GetUdidHash(deviceUdid, reinterpret_cast<uint8_t *>(udidHash)) != DM_OK) { in RegisterOffLineTimer()
|
/foundation/distributedhardware/device_manager/commondependency/src/ |
H A D | deviceprofile_connector.cpp | 97 if (Crypto::GetUdidHash(item.GetTrustDeviceId(), reinterpret_cast<uint8_t *>(deviceIdHash)) != DM_OK) { in GetDeviceAclParam()
|
/foundation/distributedhardware/device_manager/services/implementation/src/ |
H A D | device_manager_service_impl.cpp | 619 Crypto::GetUdidHash(requestDeviceId, reinterpret_cast<uint8_t *>(localDeviceId)); in PutIdenticalAccountToAcl()
|