Home
last modified time | relevance | path

Searched refs:Crypto (Results 1 - 23 of 23) sorted by relevance

/foundation/distributedhardware/device_manager/test/unittest/
H A DUTTest_dm_crypto.cpp52 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 Ddm_crypto.cpp91 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 DUTTest_dm_distributed_hardware_load.cpp75 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 DUTTest_dm_auth_manager_second.cpp1430 authManager_->authResponseContext_->importAuthCode = Crypto::Sha256(authManager_->importAuthCode_); in HWTEST_F()
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/framework/utils/
H A Dcrypto.cpp20 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 Dcrypto_test.cpp39 vector<uint8_t> randomNumbers = Crypto::Random(len, min, max); in HWTEST_F()
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter/permission/test/unittest/
H A Dpermission_validator_test.cpp68 EXPECT_NE(Crypto::Sha256("ohos"), userId); in HWTEST_F()
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/framework/include/utils/
H A Dcrypto.h24 class Crypto { class
/foundation/distributedhardware/device_manager/utils/include/crypto/
H A Ddm_crypto.h25 class Crypto { class
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/app/src/checker/
H A Dbundle_checker.cpp113 return Crypto::Sha256(appId); in GetAppId()
/foundation/distributedhardware/device_manager/services/service/src/pinholder/
H A Dpin_holder_session.cpp160 Crypto::ConvertHexStringToBytes(addr.info.ble.udidHash, UDID_HASH_LEN, in GetAddrByTargetId()
H A Dpin_holder.cpp461 if (Crypto::GetUdidHash(deviceId, reinterpret_cast<uint8_t *>(udidHashTmp)) != DM_OK) { in GetPeerDeviceId()
/foundation/distributedhardware/device_manager/services/implementation/src/authentication/
H A Ddm_auth_manager.cpp410 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 Ddevice_manager_service.cpp353 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 Ddevice_manager_service_listener.cpp447 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 Dpreprocess_utils.cpp74 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 Dsoftbus_connector.cpp579 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 Ddm_softbus_cache.cpp129 if (Crypto::GetUdidHash(udid, reinterpret_cast<uint8_t *>(udidHash)) != DM_OK) { in SaveDeviceInfo()
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/app/src/
H A Dkvstore_meta_manager.cpp442 Crypto::Sha256(label_ + "_" + Bootstrap::GetInstance().GetMetaDBName()));
H A Dkvstore_data_service.cpp266 AccountDelegate::GetInstance()->RegisterHashFunc(Crypto::Sha256); in OnStart()
/foundation/distributedhardware/device_manager/services/implementation/src/devicestate/
H A Ddm_device_state_manager.cpp217 if (Crypto::GetUdidHash(deviceUdid, reinterpret_cast<uint8_t *>(udidHash)) != DM_OK) { in RegisterOffLineTimer()
/foundation/distributedhardware/device_manager/commondependency/src/
H A Ddeviceprofile_connector.cpp97 if (Crypto::GetUdidHash(item.GetTrustDeviceId(), reinterpret_cast<uint8_t *>(deviceIdHash)) != DM_OK) { in GetDeviceAclParam()
/foundation/distributedhardware/device_manager/services/implementation/src/
H A Ddevice_manager_service_impl.cpp619 Crypto::GetUdidHash(requestDeviceId, reinterpret_cast<uint8_t *>(localDeviceId)); in PutIdenticalAccountToAcl()

Completed in 25 milliseconds