/ohos5.0/foundation/communication/dsoftbus/core/authentication/src/virtual/ |
H A D | auth_device_common_key_virtual.c | 24 void AuthUpdateCreateTime(const char *udidHash, int32_t keyType, bool isServer) in AuthUpdateCreateTime() argument 26 (void)udidHash; in AuthUpdateCreateTime() 44 int32_t AuthFindDeviceKey(const char *udidHash, int32_t keyType, AuthDeviceKeyInfo *deviceKey) in AuthFindDeviceKey() argument 46 (void)udidHash; in AuthFindDeviceKey() 56 int32_t AuthFindLatestNormalizeKey(const char *udidHash, AuthDeviceKeyInfo *deviceKey, bool clearOl… in AuthFindLatestNormalizeKey() argument 58 (void)udidHash; in AuthFindLatestNormalizeKey() 67 (void)udidHash; in AuthUpdateNormalizeKeyIndex() 74 void AuthUpdateKeyIndex(const char *udidHash, int32_t keyType, int64_t index, bool isServer) in AuthUpdateKeyIndex() argument 76 (void)udidHash; in AuthUpdateKeyIndex() 82 int32_t AuthFindNormalizeKeyByServerSide(const char *udidHash, bool isServer, AuthDeviceKeyInfo *de… in AuthFindNormalizeKeyByServerSide() argument [all …]
|
/ohos5.0/foundation/ability/form_fwk/test/unittest/fms_form_util_test/ |
H A D | fms_form_util_test.cpp | 80 constexpr int64_t udidHash = 0x1111111100000000L; variable 81 const int64_t result = FormUtil::GenerateFormId(udidHash); 83 EXPECT_EQ(udidHash, (udidHash & result)); 94 constexpr uint64_t udidHash = 0x0000000011111111L; variable 95 const int64_t result = FormUtil::PaddingUdidHash(formId, udidHash); 108 constexpr uint64_t udidHash = 0x1111111100000000L; variable 111 EXPECT_EQ(result, udidHash | formId); 121 int64_t udidHash = 0x1111111100000000L; variable 122 auto result = FormUtil::GenerateUdidHash(udidHash); 134 int64_t udidHash = 0; variable [all …]
|
/ohos5.0/foundation/communication/dsoftbus/tests/core/bus_center/test/mock/src/ |
H A D | hb_strategy_mock.cpp | 137 bool IsNeedAuthLimit(const char *udidHash) in IsNeedAuthLimit() argument 139 return HeartBeatStrategyInterface()->IsNeedAuthLimit(udidHash); in IsNeedAuthLimit() 142 bool IsExistLnnDfxNodeByUdidHash(const char *udidHash, LnnBleReportExtra *bleExtra) in IsExistLnnDfxNodeByUdidHash() argument 144 return HeartBeatStrategyInterface()->IsExistLnnDfxNodeByUdidHash(udidHash, bleExtra); in IsExistLnnDfxNodeByUdidHash() 168 void AddNodeToLnnBleReportExtraMap(const char *udidHash, const LnnBleReportExtra *bleExtra) in AddNodeToLnnBleReportExtraMap() argument 170 return HeartBeatStrategyInterface()->AddNodeToLnnBleReportExtraMap(udidHash, bleExtra); in AddNodeToLnnBleReportExtraMap() 173 int32_t GetNodeFromLnnBleReportExtraMap(const char *udidHash, LnnBleReportExtra *bleExtra) in GetNodeFromLnnBleReportExtraMap() argument 178 void DeleteNodeFromLnnBleReportExtraMap(const char *udidHash) in DeleteNodeFromLnnBleReportExtraMap() argument 180 return HeartBeatStrategyInterface()->DeleteNodeFromLnnBleReportExtraMap(udidHash); in DeleteNodeFromLnnBleReportExtraMap() 188 int32_t GetNodeFromPcRestrictMap(const char *udidHash, uint32_t *count) in GetNodeFromPcRestrictMap() argument [all …]
|
/ohos5.0/foundation/communication/dsoftbus/core/authentication/src/ |
H A D | auth_normalize_request.c | 31 static uint32_t GetSameRequestNum(char *udidHash) in GetSameRequestNum() argument 36 Anonymize(udidHash, &anonyUdidHash); in GetSameRequestNum() 40 if (strncmp(item->udidHash, udidHash, UDID_SHORT_HASH_STR) != 0) { in GetSameRequestNum() 48 static int32_t GetRequestListByUdidHash(char *udidHash, bool isNeedClear, in GetRequestListByUdidHash() argument 51 if (udidHash == NULL) { in GetRequestListByUdidHash() 55 *num = GetSameRequestNum(udidHash); in GetRequestListByUdidHash() 69 if (strncmp(item->udidHash, udidHash, UDID_SHORT_HASH_STR) != 0 || index >= (*num)) { in GetRequestListByUdidHash() 114 int32_t ret = GetRequestListByUdidHash(request->udidHash, isNeedClear, requests, num); in GetNormalizeRequestList() 169 uint32_t waitNum = GetSameRequestNum(newRequest->udidHash); in AddNormalizeRequest()
|
H A D | auth_session_message.c | 447 static bool IsEmptyShortHashStr(char *udidHash) in IsEmptyShortHashStr() argument 449 if (strlen(udidHash) == 0) { in IsEmptyShortHashStr() 459 if (strncmp(emptyHashStr, udidHash, strlen(emptyHashStr)) == EOK) { in IsEmptyShortHashStr() 466 static int32_t GetLocalUdidHash(char *udid, char *udidHash, uint32_t len) in GetLocalUdidHash() argument 468 if (udid == NULL || udidHash == NULL || len < UDID_HASH_LEN) { in GetLocalUdidHash() 509 char udidHash[SHA_256_HEX_HASH_LEN] = { 0 }; in UpdateLocalAuthState() local 514 if (!GetUdidShortHash(info, udidHash, SHA_256_HEX_HASH_LEN) || in UpdateLocalAuthState() 515 IsEmptyShortHashStr(udidHash)) { in UpdateLocalAuthState() 518 } else if (memcmp(localUdidHash, udidHash, SHORT_HASH_LEN) < 0) { in UpdateLocalAuthState() 520 } else if (memcmp(localUdidHash, udidHash, SHORT_HASH_LEN) > 0) { in UpdateLocalAuthState() [all …]
|
H A D | auth_deviceprofile.cpp | 70 uint8_t udidHash[SHA_256_HASH_LEN] = {0}; in DelNotTrustDevice() local 72 if (SoftBusGenerateStrHash((const unsigned char *)udid, strlen(udid), udidHash) != SOFTBUS_OK) { in DelNotTrustDevice() 76 …if (ConvertBytesToHexString(hashStr, CUST_UDID_LEN + 1, udidHash, CUST_UDID_LEN / HEXIFY_UNIT_LEN)… in DelNotTrustDevice() 102 uint8_t udidHash[SHA_256_HASH_LEN] = {0}; in IsTrustDevice() local 105 trustDevice.GetTrustDeviceId().length(), udidHash) != SOFTBUS_OK) { in IsTrustDevice() 109 if (ConvertBytesToHexString(hashStr, CUST_UDID_LEN + 1, udidHash, in IsTrustDevice()
|
/ohos5.0/foundation/distributedhardware/device_manager/utils/src/crypto/ |
H A D | dm_crypto.cpp | 113 int32_t Crypto::GetUdidHash(const std::string &udid, unsigned char *udidHash) in GetUdidHash() argument 117 if (ConvertBytesToHexString(reinterpret_cast<char *>(udidHash), SHORT_DEVICE_ID_HASH_LENGTH + 1, in GetUdidHash() 214 int32_t Crypto::ConvertUdidHashToAnoyAndSave(const std::string &appId, const std::string &udidHash, in ConvertUdidHashToAnoyAndSave() argument 217 if (GetAnoyDeviceInfo(appId, udidHash, kvValue) == DM_OK) { in ConvertUdidHashToAnoyAndSave() 222 int32_t ret = ConvertUdidHashToAnoyGenerate(appId, udidHash, kvValue); in ConvertUdidHashToAnoyAndSave() 231 int32_t Crypto::ConvertUdidHashToAnoyDeviceId(const std::string &appId, const std::string &udidHash, in ConvertUdidHashToAnoyDeviceId() argument 235 if (GetAnoyDeviceInfo(appId, udidHash, kvValue) == DM_OK) { in ConvertUdidHashToAnoyDeviceId() 238 return ConvertUdidHashToAnoyGenerate(appId, udidHash, kvValue); in ConvertUdidHashToAnoyDeviceId() 244 std::string udidPrefix = appId + DB_KEY_DELIMITER + udidHash; in GetAnoyDeviceInfo() 257 std::string udidTemp = appId + DB_KEY_DELIMITER + udidHash + DB_KEY_DELIMITER + salt; in ConvertUdidHashToAnoyGenerate() [all …]
|
/ohos5.0/foundation/communication/dsoftbus/core/authentication/include/ |
H A D | auth_device_common_key.h | 43 void AuthUpdateCreateTime(const char *udidHash, int32_t keyType, bool isServer); 46 int32_t AuthFindDeviceKey(const char *udidHash, int32_t keyType, AuthDeviceKeyInfo *deviceKey); 47 void AuthUpdateKeyIndex(const char *udidHash, int32_t keyType, int64_t index, bool isServer); 48 void AuthUpdateNormalizeKeyIndex(const char *udidHash, int64_t index, AuthLinkType type, SessionKey… 50 int32_t AuthFindNormalizeKeyByServerSide(const char *udidHash, bool isServer, AuthDeviceKeyInfo *de… 51 int32_t AuthFindLatestNormalizeKey(const char *udidHash, AuthDeviceKeyInfo *deviceKey, bool clearOl…
|
/ohos5.0/foundation/communication/dsoftbus/tests/core/authentication/unittest/ |
H A D | auth_normalize_request_test.cpp | 58 const char *udidHash = "testudidhash"; variable 63 (void)memcpy_s(request.udidHash, SHA_256_HEX_HASH_LEN, udidHash, SHA_256_HEX_HASH_LEN); 91 const char *udidHash = "testudidhash1"; variable 96 (void)memcpy_s(request.udidHash, SHA_256_HEX_HASH_LEN, udidHash, SHA_256_HEX_HASH_LEN);
|
H A D | auth_session_message_test.cpp | 735 char udidHash[SHA_256_HEX_HASH_LEN]; variable 738 (void)memset_s(udidHash, sizeof(udidHash), 0, sizeof(udidHash)); 739 EXPECT_TRUE(strcpy_s(udidHash, sizeof(udidHash), "") == EOK); 740 bool ret = IsEmptyShortHashStr(udidHash); 743 (void)memset_s(udidHash, sizeof(udidHash), 0, sizeof(udidHash)); 744 EXPECT_TRUE(strcpy_s(udidHash, sizeof(udidHash), udidHash1) == EOK); 745 ret = IsEmptyShortHashStr(udidHash); 748 (void)memset_s(udidHash, sizeof(udidHash), 0, sizeof(udidHash)); 749 EXPECT_TRUE(strcpy_s(udidHash, sizeof(udidHash), udidHash2) == EOK); 750 ret = IsEmptyShortHashStr(udidHash); [all …]
|
H A D | auth_common_mock.cpp | 130 int32_t GetNodeFromPcRestrictMap(const char *udidHash, uint32_t *count) in GetNodeFromPcRestrictMap() argument 132 return GetCommonInterface()->GetNodeFromPcRestrictMap(udidHash, count); in GetNodeFromPcRestrictMap() 135 void DeleteNodeFromPcRestrictMap(const char *udidHash) in DeleteNodeFromPcRestrictMap() argument 137 return GetCommonInterface()->DeleteNodeFromPcRestrictMap(udidHash); in DeleteNodeFromPcRestrictMap()
|
/ohos5.0/foundation/ability/form_fwk/services/src/ |
H A D | form_util.cpp | 56 int64_t FormUtil::GenerateFormId(int64_t udidHash) in GenerateFormId() argument 73 unsignedUdidHash = static_cast<uint64_t>(udidHash); in GenerateFormId() 106 int64_t FormUtil::PaddingUdidHash(uint64_t formId, uint64_t udidHash) in PaddingUdidHash() argument 110 return udidHash | formId; in PaddingUdidHash() 120 bool FormUtil::GenerateUdidHash(int64_t &udidHash) in GenerateUdidHash() argument 122 HILOG_INFO("udidHash:%{private}s", std::to_string(udidHash).c_str()); in GenerateUdidHash() 123 if (udidHash != INVALID_UDID_HASH) { in GenerateUdidHash() 129 udidHash = (hashId & 0x0000000000ffffffL) << thirtyTwo; in GenerateUdidHash() 130 if (udidHash < 0) { in GenerateUdidHash() 131 udidHash = 0L; in GenerateUdidHash() [all …]
|
/ohos5.0/foundation/distributedhardware/distributed_hardware_fwk/services/distributedhardwarefwkservice/src/resourcemanager/ |
H A D | meta_info_manager.cpp | 154 int32_t MetaInfoManager::SyncMetaInfoFromDB(const std::string &udidHash) in SyncMetaInfoFromDB() argument 156 if (!IsHashSizeValid(udidHash)) { in SyncMetaInfoFromDB() 195 for (const auto &udidHash : udidHashVec) { in SyncRemoteMetaInfos() local 211 const std::string &udidHash = metaCapInfo->GetUdidHash(); in SyncRemoteMetaInfos() local 213 if (udidHash.compare(localUdidHash) == 0) { in SyncRemoteMetaInfos() 273 int32_t MetaInfoManager::GetMetaCapInfo(const std::string &udidHash, in GetMetaCapInfo() argument 276 if (!IsHashSizeValid(udidHash) || !IsIdLengthValid(dhId)) { in GetMetaCapInfo() 280 std::string key = GetCapabilityKey(udidHash, dhId); in GetMetaCapInfo() 289 void MetaInfoManager::GetMetaCapInfosByUdidHash(const std::string &udidHash, in GetMetaCapInfosByUdidHash() argument 292 if (!IsHashSizeValid(udidHash)) { in GetMetaCapInfosByUdidHash() [all …]
|
/ohos5.0/foundation/distributedhardware/device_manager/utils/include/crypto/ |
H A D | dm_crypto.h | 31 static int32_t GetUdidHash(const std::string &udid, unsigned char *udidHash); 37 … static int32_t ConvertUdidHashToAnoyAndSave(const std::string &appId, const std::string &udidHash, 39 …static int32_t ConvertUdidHashToAnoyDeviceId(const std::string &appId, const std::string &udidHash, 41 …static int32_t GetAnoyDeviceInfo(const std::string &appId, const std::string &udidHash, DmKVValue … 42 …static int32_t ConvertUdidHashToAnoyGenerate(const std::string &appId, const std::string &udidHash,
|
/ohos5.0/foundation/communication/dsoftbus/core/bus_center/lnn/net_builder/include/ |
H A D | lnn_net_builder.h | 170 void AddNodeToLnnBleReportExtraMap(const char *udidHash, const LnnBleReportExtra *bleExtra); 171 int32_t GetNodeFromLnnBleReportExtraMap(const char *udidHash, LnnBleReportExtra *bleExtra); 172 bool IsExistLnnDfxNodeByUdidHash(const char *udidHash, LnnBleReportExtra *bleExtra); 173 void DeleteNodeFromLnnBleReportExtraMap(const char *udidHash); 202 void AddNodeToPcRestrictMap(const char *udidHash); 204 void DeleteNodeFromPcRestrictMap(const char *udidHash); 205 int32_t GetNodeFromPcRestrictMap(const char *udidHash, uint32_t *count); 206 int32_t UpdateNodeFromPcRestrictMap(const char *udidHash);
|
/ohos5.0/foundation/communication/dsoftbus/core/bus_center/lnn/lane_hub/heartbeat/src/ |
H A D | lnn_heartbeat_medium_mgr.c | 662 if (udidHash == NULL) { in HbAddAsyncProcessCallbackDelay() 667 … udidHash, SHORT_UDID_HASH_HEX_LEN + 1, device->addr[0].info.ble.udidHash, SHORT_UDID_HASH_LEN); in HbAddAsyncProcessCallbackDelay() 670 SoftBusFree(udidHash); in HbAddAsyncProcessCallbackDelay() 683 SoftBusFree(udidHash); in HbAddAsyncProcessCallbackDelay() 691 SoftBusFree(udidHash); in HbAddAsyncProcessCallbackDelay() 794 if (IsNeedAuthLimit(udidHash)) { in HbSuspendReAuth() 974 if (udidHash == NULL) { in HbMediumMgrRecvHigherWeight() 981 Anonymize(udidHash, &anonyUdid); in HbMediumMgrRecvHigherWeight() 1000 Anonymize(udidHash, &anonyUdid); in HbMediumMgrRecvHigherWeight() 1021 if (udidHash == NULL) { in HbMediumMgrRelayProcess() [all …]
|
/ohos5.0/foundation/distributedhardware/device_manager/services/implementation/src/devicestate/ |
H A D | dm_device_state_manager.cpp | 216 char udidHash[DM_MAX_DEVICE_ID_LEN] = {0}; in RegisterOffLineTimer() local 224 if ((iter.first == std::string(udidHash)) && (timer_ != nullptr)) { in RegisterOffLineTimer() 227 auto idIter = udidhash2udidMap_.find(udidHash); in RegisterOffLineTimer() 234 if (stateTimerInfoMap_.find(std::string(udidHash)) == stateTimerInfoMap_.end()) { in RegisterOffLineTimer() 241 stateTimerInfoMap_[std::string(udidHash)] = stateTimer; in RegisterOffLineTimer() 243 if (udidhash2udidMap_.find(std::string(udidHash)) == udidhash2udidMap_.end()) { in RegisterOffLineTimer() 244 udidhash2udidMap_[std::string(udidHash)] = deviceUdid; in RegisterOffLineTimer() 267 void DmDeviceStateManager::DeleteOffLineTimer(std::string udidHash) in DeleteOffLineTimer() argument 271 if (timer_ == nullptr || udidHash.empty()) { in DeleteOffLineTimer() 274 auto iter = stateTimerInfoMap_.find(udidHash); in DeleteOffLineTimer() [all …]
|
/ohos5.0/foundation/communication/dsoftbus/tests/core/bus_center/test/mock/include/ |
H A D | hb_strategy_mock.h | 57 virtual bool IsNeedAuthLimit(const char *udidHash) = 0; 58 virtual bool IsExistLnnDfxNodeByUdidHash(const char *udidHash, LnnBleReportExtra *bleExtra) = 0; 64 …virtual void AddNodeToLnnBleReportExtraMap(const char *udidHash, const LnnBleReportExtra *bleExtra… 65 …virtual int32_t GetNodeFromLnnBleReportExtraMap(const char *udidHash, LnnBleReportExtra *bleExtra)… 66 virtual void DeleteNodeFromLnnBleReportExtraMap(const char *udidHash) = 0; 68 virtual int32_t GetNodeFromPcRestrictMap(const char *udidHash, uint32_t *count) = 0;
|
/ohos5.0/foundation/distributedhardware/distributed_hardware_fwk/common/utils/include/ |
H A D | device_type.h | 68 std::string udidHash; member 75 std::string udid, std::string udidHash, std::string deviceName, in DeviceInfo() 77 udid(udid), udidHash(udidHash), deviceName(deviceName), deviceType(deviceType) {} in DeviceInfo()
|
/ohos5.0/foundation/distributedhardware/distributed_hardware_fwk/services/distributedhardwarefwkservice/src/task/ |
H A D | online_task.cpp | 85 std::string udidHash = Sha256(GetUDID()); in DoSyncInfo() local 89 GetAnonyString(udidHash).c_str()); in DoSyncInfo() 96 ret = MetaInfoManager::GetInstance()->SyncMetaInfoFromDB(udidHash); in DoSyncInfo() 99 GetAnonyString(udidHash).c_str(), ret); in DoSyncInfo() 125 std::string udidHash = Sha256(GetUDID()); in CreateEnableTask() local 127 MetaInfoManager::GetInstance()->GetMetaCapInfosByUdidHash(udidHash, metaCapInfos); in CreateEnableTask()
|
/ohos5.0/foundation/communication/dsoftbus/core/bus_center/lnn/net_builder/src/ |
H A D | lnn_net_builder.c | 1400 if (udidHash == NULL || bleExtra == NULL) { in IsExistLnnDfxNodeByUdidHash() 1412 Anonymize(udidHash, &anonyUdidHash); in IsExistLnnDfxNodeByUdidHash() 1420 if (!g_lnnDfxReportIsInit || udidHash == NULL) { in DeleteNodeFromLnnBleReportExtraMap() 1466 void AddNodeToPcRestrictMap(const char *udidHash) in AddNodeToPcRestrictMap() argument 1468 if (!g_lnnDfxPcIsInit || udidHash == NULL) { in AddNodeToPcRestrictMap() 1484 Anonymize(udidHash, &anonyUdid); in AddNodeToPcRestrictMap() 1503 void DeleteNodeFromPcRestrictMap(const char *udidHash) in DeleteNodeFromPcRestrictMap() argument 1505 if (!g_lnnDfxPcIsInit || udidHash == NULL) { in DeleteNodeFromPcRestrictMap() 1521 Anonymize(udidHash, &anonyUdid); in DeleteNodeFromPcRestrictMap() 1548 if (!g_lnnDfxPcIsInit || udidHash == NULL) { in UpdateNodeFromPcRestrictMap() [all …]
|
/ohos5.0/foundation/ability/form_fwk/services/include/ |
H A D | form_util.h | 35 static int64_t GenerateFormId(int64_t udidHash); 49 static int64_t PaddingUdidHash(uint64_t formId, uint64_t udidHash); 56 static bool GenerateUdidHash(int64_t &udidHash);
|
/ohos5.0/foundation/distributedhardware/device_manager/radar/src/lite/ |
H A D | dm_radar_helper.cpp | 157 std::string udidHash = GetUdidHashByUdid(std::string(deviceInfoList[i].deviceId)); in GetDeviceInfoList() local 158 cJSON_AddStringToObject(object, "PEER_UDID", udidHash.c_str()); in GetDeviceInfoList() 170 char udidHash[DM_MAX_DEVICE_ID_LEN] = {0}; in GetUdidHashByUdid() local 171 if (Crypto::GetUdidHash(udid, reinterpret_cast<uint8_t *>(udidHash)) != DM_OK) { in GetUdidHashByUdid() 174 return GetAnonyUdid(std::string(udidHash)); in GetUdidHashByUdid()
|
/ohos5.0/foundation/distributedhardware/distributed_hardware_fwk/services/distributedhardwarefwkservice/src/utils/ |
H A D | dh_context.cpp | 128 std::string udidHash = Sha256(udid); in AddOnlineDevice() local 134 .udidHash = udidHash in AddOnlineDevice() 213 std::string udidHash = ""; in GetUdidHashIdByUUID() local 216 udidHash = iter->udidHash; in GetUdidHashIdByUUID() 220 return udidHash; in GetUdidHashIdByUUID() 263 if (iter->deviceId == deviceId || iter->udidHash == deviceId) { in GetUUIDByDeviceId() 291 udidHashVec.push_back(iter->udidHash); in GetOnlineDeviceUdidHash()
|
/ohos5.0/foundation/distributedhardware/distributed_hardware_fwk/services/distributedhardwarefwkservice/include/utils/ |
H A D | dh_context.h | 42 std::string udidHash; member 50 (udidHash == other.udidHash); 63 (udidHash.compare(other.udidHash) < 0));
|