Home
last modified time | relevance | path

Searched refs:strLen (Results 1 - 25 of 88) sorted by relevance

1234

/foundation/filemanagement/storage_service/services/storage_manager/utils/src/
H A Dstorage_utils.cpp43 size_t strLen = value.length(); in GetAnonyString() local
44 if (strLen < INT32_MIN_ID_LENGTH) { in GetAnonyString()
48 if (strLen <= INT32_SHORT_ID_LENGTH) { in GetAnonyString()
51 res += value[strLen - 1]; in GetAnonyString()
55 res.append(value, strLen - INT32_PLAINTEXT_LENGTH, INT32_PLAINTEXT_LENGTH); in GetAnonyString()
/foundation/filemanagement/dfs_service/utils/log/src/
H A Dutils_log.cpp33 size_t strLen = value.length(); in GetAnonyString() local
34 if (strLen < INT32_MIN_ID_LENGTH) { in GetAnonyString()
38 if (strLen <= INT32_SHORT_ID_LENGTH) { in GetAnonyString()
41 res += value[strLen - 1]; in GetAnonyString()
45 res.append(value, INT32_PLAINTEXT_LENGTH + tmpStr.length(), strLen - INT32_PLAINTEXT_LENGTH - tmpStr.length()); in GetAnonyString()
/foundation/communication/wifi/wifi/test/wifi_standard/wifi_hal/unittest/
H A Dwifi_hal_common_func_test.cpp43 int strLen = MAC_LEN + 1; in HWTEST_F() local
44 EXPECT_EQ(ConvertMacToStr(mac, macSize, macStr, strLen), -1); in HWTEST_F()
52 int strLen = MAC_LEN + 1; in HWTEST_F() local
53 EXPECT_EQ(ConvertMacToStr(mac, macSize, macStr, strLen), -1); in HWTEST_F()
61 int strLen = MAC_LEN + 1; in HWTEST_F() local
62 EXPECT_EQ(ConvertMacToStr(mac, macSize, macStr, strLen), -1); in HWTEST_F()
70 int strLen = MAC_LEN; in HWTEST_F() local
71 EXPECT_EQ(ConvertMacToStr(mac, macSize, macStr, strLen), -1); in HWTEST_F()
79 int strLen = MAC_LEN + 1; in HWTEST_F() local
80 EXPECT_EQ(ConvertMacToStr(mac, macSize, macStr, strLen), in HWTEST_F()
[all...]
/foundation/distributeddatamgr/preferences/frameworks/ndk/src/
H A Doh_preferences_value.cpp129 size_t strLen = str.size(); in OH_PreferencesValue_GetString() local
130 if (strLen >= SIZE_MAX) { in OH_PreferencesValue_GetString()
131 LOG_ERROR("string length overlimit: %{public}zu", strLen); in OH_PreferencesValue_GetString()
134 void *ptr = malloc(strLen + 1); // free by caller in OH_PreferencesValue_GetString()
140 int sysErr = memset_s(*value, (strLen + 1), 0, (strLen + 1)); in OH_PreferencesValue_GetString()
144 if (strLen > 0) { in OH_PreferencesValue_GetString()
145 sysErr = memcpy_s(*value, strLen, str.c_str(), strLen); in OH_PreferencesValue_GetString()
152 *valueLen = strLen in OH_PreferencesValue_GetString()
[all...]
/foundation/distributedhardware/distributed_hardware_fwk/av_transport/common/src/
H A Dav_trans_log.cpp38 size_t strLen = value.length(); in GetAnonyString() local
39 if (strLen < INT32_MIN_ID_LENGTH) { in GetAnonyString()
43 if (strLen <= INT32_SHORT_ID_LENGTH) { in GetAnonyString()
46 res += value[strLen - 1]; in GetAnonyString()
50 res.append(value, strLen - INT32_PLAINTEXT_LENGTH, INT32_PLAINTEXT_LENGTH); in GetAnonyString()
/foundation/distributedhardware/distributed_hardware_fwk/utils/src/
H A Danonymous_string.cpp42 size_t strLen = value.length(); in GetAnonyString() local
43 if (strLen < INT32_MIN_ID_LENGTH) { in GetAnonyString()
47 if (strLen <= INT32_SHORT_ID_LENGTH) { in GetAnonyString()
50 res += value[strLen - 1]; in GetAnonyString()
54 res.append(value, strLen - INT32_PLAINTEXT_LENGTH, INT32_PLAINTEXT_LENGTH); in GetAnonyString()
/foundation/filemanagement/app_file_service/utils/src/b_anony/
H A Db_anony.cpp30 size_t strLen = value.length(); in GetAnonyString() local
31 if (strLen < anonyLength) { in GetAnonyString()
35 if (strLen <= shortPlaintextLength) { in GetAnonyString()
38 result += value[strLen - 1]; in GetAnonyString()
42 result += value.substr(strLen - plaintextLength, plaintextLength); in GetAnonyString()
/foundation/deviceprofile/device_info_manager/old/common/src/
H A Ddevice_profile_utils.cpp78 size_t strLen = value.length(); in AnonymizeString() local
79 if (strLen < INT32_MIN_ID_LENGTH) { in AnonymizeString()
83 if (strLen <= INT32_SHORT_ID_LENGTH) { in AnonymizeString()
86 res += value[strLen - 1]; in AnonymizeString()
90 res.append(value, strLen - INT32_PLAINTEXT_LENGTH, INT32_PLAINTEXT_LENGTH); in AnonymizeString()
/foundation/distributeddatamgr/preferences/frameworks/native/src/
H A Dpreferences_value_parcel.cpp72 uint32_t strLen = sizeof(uint8_t) + sizeof(size_t); in CalSize() local
73 strLen += (type == STRING_TYPE) ? std::get<std::string>(value.value_).size() : in CalSize()
75 return strLen; in CalSize()
177 * | type | strLen | strData |
179 * len: uint8_t size_t strLen
198 size_t strLen = stringValue.size(); in MarshallingStringValue() local
199 errCode = memcpy_s(startAddr + sizeof(uint8_t), sizeof(size_t), &strLen, sizeof(size_t)); in MarshallingStringValue()
204 if (strLen == 0) { in MarshallingStringValue()
207 errCode = memcpy_s(startAddr + sizeof(uint8_t) + sizeof(size_t), strLen, in MarshallingStringValue()
208 stringValue.c_str(), strLen); in MarshallingStringValue()
246 size_t strLen = strVec[i].size(); MarshallingStringArrayValue() local
487 size_t strLen = *(reinterpret_cast<const size_t *>(startAddr + sizeof(uint8_t))); UnmarshallingStringValue() local
520 size_t strLen = *(reinterpret_cast<const size_t *>(startAddr)); UnmarshallingStringArrayValue() local
[all...]
/foundation/communication/wifi/wifi/test/wifi_standard/wifi_framework/wifi_manage/wifi_native/client/hdi_client/hdi_interface/
H A Dwifi_hdi_wpa_sta_impl_test.cpp251 int strLen = MAC_LEN + 1; in HWTEST_F() local
252 int result = ConvertMacToStr(mac, macSize, macStr, strLen); in HWTEST_F()
261 int strLen = MAC_LEN + 1; in HWTEST_F() local
262 int result = ConvertMacToStr(mac, macSize, macStr, strLen); in HWTEST_F()
271 int strLen = MAC_LEN + 1; in HWTEST_F() local
272 int result = ConvertMacToStr(mac, macSize, macStr, strLen); in HWTEST_F()
281 int strLen = LENTH; in HWTEST_F() local
282 int result = ConvertMacToStr(mac, macSize, macStr, strLen); in HWTEST_F()
291 int strLen = MAC_LEN + 1; in HWTEST_F() local
292 int result = ConvertMacToStr(mac, macSize, macStr, strLen); in HWTEST_F()
301 int strLen = MAC_LEN; HWTEST_F() local
311 int strLen = LENTH; HWTEST_F() local
321 int strLen = MAC_LEN + 1; HWTEST_F() local
331 int strLen = MAC_LEN + 1; HWTEST_F() local
[all...]
/foundation/arkui/ui_lite/frameworks/common/
H A Dimage.cpp120 size_t strLen = strlen(src) + 1; in SetStandardSrc() local
121 char* imagePath = static_cast<char*>(UIMalloc(static_cast<uint32_t>(strLen))); in SetStandardSrc()
126 if (strcpy_s(imagePath, strLen, src) != EOK) { in SetStandardSrc()
149 size_t strLen = strlen(src) + strlen(suffixName) + 1; in SetLiteSrc() local
150 char* imagePath = static_cast<char*>(UIMalloc(static_cast<uint32_t>(strLen))); in SetLiteSrc()
155 if (memcpy_s(imagePath, strLen, src, strLen) != EOK) { in SetLiteSrc()
160 if (strcat_s(imagePath, strLen, suffixName) != EOK) { // The format is xxx.xxx.bin in SetLiteSrc()
166 if (memcpy_s(imagePath, strLen, src, strLen) ! in SetLiteSrc()
244 size_t strLen = strlen(src) + 1; PreParse() local
[all...]
/foundation/filemanagement/file_api/utils/filemgmt_libn/src/
H A Dn_val.cpp64 auto [succ, path, strLen] = ToUTF8String(); in ToUTF8StringPath()
65 if (succ == false || std::strlen(path.get()) < strLen) { in ToUTF8StringPath()
68 return make_tuple(true, move(path), strLen); in ToUTF8StringPath()
73 size_t strLen = 0; in ToUTF8String() local
74 napi_status status = napi_get_value_string_utf8(env_, val_, nullptr, -1, &strLen); in ToUTF8String()
78 if (strLen == std::numeric_limits<size_t>::max()) { in ToUTF8String()
82 size_t bufLen = strLen + 1; in ToUTF8String()
87 status = napi_get_value_string_utf8(env_, val_, str.get(), bufLen, &strLen); in ToUTF8String()
91 return make_tuple(status == napi_ok, move(str), strLen); in ToUTF8String()
111 size_t strLen in ToUTF16String() local
[all...]
/foundation/filemanagement/file_api/interfaces/kits/js/src/common/napi/
H A Dn_val.cpp63 auto [succ, path, strLen] = ToUTF8String(); in ToUTF8StringPath()
64 if (succ == false || std::strlen(path.get()) < strLen) { in ToUTF8StringPath()
67 return make_tuple(true, move(path), strLen); in ToUTF8StringPath()
72 size_t strLen = 0; in ToUTF8String() local
73 napi_status status = napi_get_value_string_utf8(env_, val_, nullptr, -1, &strLen); in ToUTF8String()
78 size_t bufLen = strLen + 1; in ToUTF8String()
80 status = napi_get_value_string_utf8(env_, val_, str.get(), bufLen, &strLen); in ToUTF8String()
81 return make_tuple(status == napi_ok, move(str), strLen); in ToUTF8String()
97 size_t strLen = 0; in ToUTF16String() local
98 napi_status status = napi_get_value_string_utf16(env_, val_, nullptr, -1, &strLen); in ToUTF16String()
[all...]
/foundation/filemanagement/storage_service/services/storage_daemon/utils/
H A Ddisk_utils.cpp150 size_t strLen = value.length(); in GetAnonyString() local
151 if (strLen < INT32_MIN_ID_LENGTH) { in GetAnonyString()
155 if (strLen <= INT32_SHORT_ID_LENGTH) { in GetAnonyString()
158 res += value[strLen - 1]; in GetAnonyString()
162 res.append(value, strLen - INT32_PLAINTEXT_LENGTH, INT32_PLAINTEXT_LENGTH); in GetAnonyString()
/foundation/distributedhardware/distributed_camera/common/src/utils/
H A Danonymous_string.cpp63 size_t strLen = value.length(); in GetAnonyString() local
64 if (strLen < INT32_MIN_ID_LENGTH) { in GetAnonyString()
68 if (strLen <= INT32_SHORT_ID_LENGTH) { in GetAnonyString()
71 res += value[strLen - 1]; in GetAnonyString()
75 res.append(value, strLen - INT32_PLAINTEXT_LENGTH, INT32_PLAINTEXT_LENGTH); in GetAnonyString()
/foundation/arkui/ace_engine_lite/frameworks/src/core/stylemgr/
H A Dapp_style_item.cpp87 uint16_t strLen = 0; in GenerateFromJSValue() local
88 char *keyNameBuffer = MallocStringOf(stylePropName, &strLen); in GenerateFromJSValue()
94 if (strLen == 0) { in GenerateFromJSValue()
101 uint8_t pseudoType_ = EstimatePseudoClassType(static_cast<char *>(keyNameBuffer), &strLen); in GenerateFromJSValue()
103 CreateStyleItem(KeyParser::ParseKeyId(static_cast<const char *>(keyNameBuffer), strLen), in GenerateFromJSValue()
/foundation/distributedhardware/distributed_screen/common/src/
H A Ddscreen_util.cpp92 size_t strLen = value.length(); in GetAnonyString() local
93 if (strLen < int32MinIdLength) { in GetAnonyString()
97 if (strLen <= int32ShortIdLength) { in GetAnonyString()
100 result += value[strLen - 1]; in GetAnonyString()
105 result.append(value, strLen - int32PlainTextLength, int32PlainTextLength); in GetAnonyString()
/foundation/bundlemanager/bundle_framework/interfaces/kits/js/zip/napi/common/
H A Dnapi_value.cpp65 size_t strLen = 0; in ToUTF8String() local
66 napi_status status = napi_get_value_string_utf8(env_, val_, nullptr, -1, &strLen); in ToUTF8String()
71 size_t bufLen = strLen + 1; in ToUTF8String()
73 status = napi_get_value_string_utf8(env_, val_, str.get(), bufLen, &strLen); in ToUTF8String()
74 return make_tuple(status == napi_ok, move(str), strLen); in ToUTF8String()
90 size_t strLen = 0; in ToUTF16String() local
91 napi_status status = napi_get_value_string_utf16(env_, val_, nullptr, -1, &strLen); in ToUTF16String()
96 auto str = make_unique<char16_t[]>(++strLen); in ToUTF16String()
97 status = napi_get_value_string_utf16(env_, val_, str.get(), strLen, nullptr); in ToUTF16String()
102 strLen in ToUTF16String()
[all...]
/foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/webgl/common/napi/
H A Dn_val.cpp119 size_t strLen = 0; in ToUTF8String() local
120 napi_status status = napi_get_value_string_utf8(env_, val_, nullptr, -1, &strLen); in ToUTF8String()
125 size_t bufLen = strLen + 1; in ToUTF8String()
127 status = napi_get_value_string_utf8(env_, val_, str.get(), bufLen, &strLen); in ToUTF8String()
128 return make_tuple(status == napi_ok, move(str), strLen); in ToUTF8String()
134 size_t strLen = 0; in ToUTF16String() local
135 napi_status status = napi_get_value_string_utf16(env_, val_, nullptr, -1, &strLen); in ToUTF16String()
140 auto str = make_unique<char16_t[]>(++strLen); in ToUTF16String()
141 status = napi_get_value_string_utf16(env_, val_, str.get(), strLen, nullptr); in ToUTF16String()
146 strLen in ToUTF16String()
[all...]
/foundation/multimedia/av_codec/test/moduletest/audio_encoder/InnerAPI/
H A DInnerFuzzTest.cpp120 int32_t strLen = rand() % 1000; in HWTEST_F() local
121 string randStr = getRandStr(strLen); in HWTEST_F()
139 int strLen = 0; in HWTEST_F() local
144 strLen = rand() % 65536; in HWTEST_F()
145 test_value = getRandStr(strLen); in HWTEST_F()
357 int strLen = 0; in HWTEST_F() local
363 strLen = rand() % 65536; in HWTEST_F()
364 test_key = getRandStr(strLen); in HWTEST_F()
365 cout << "test key len is:" << strLen << endl; in HWTEST_F()
366 strLen in HWTEST_F()
[all...]
/foundation/multimedia/av_codec/test/moduletest/audio_decoder/InnerAPI/
H A DInnerFuzzTest.cpp121 int32_t strLen = rand() % 1000; in HWTEST_F() local
122 string randStr = getRandStr(strLen); in HWTEST_F()
142 int strLen = 0; in HWTEST_F() local
147 strLen = rand() % 65536; in HWTEST_F()
148 test_value = getRandStr(strLen); in HWTEST_F()
350 int strLen = 0; in HWTEST_F() local
356 strLen = rand() % 65536; in HWTEST_F()
357 test_key = getRandStr(strLen); in HWTEST_F()
358 cout << "test key len is:" << strLen << endl; in HWTEST_F()
359 strLen in HWTEST_F()
[all...]
/foundation/communication/dhcp/services/dhcp_server/src/
H A Ddhcp_binding.cpp148 size_t strLen = p - pos + 1; in SplitString() local
149 strs[num] = (char *)calloc(strLen, sizeof(char)); in SplitString()
150 if (strs[num] == nullptr || strncpy_s(strs[num], strLen, pos, p - pos) != EOK) { in SplitString()
159 size_t strLen = strlen(pos) + 1; in SplitString() local
160 strs[num] = (char *)calloc(strLen, sizeof(char)); in SplitString()
161 if (strs[num] == nullptr || strncpy_s(strs[num], strLen, pos, strlen(pos)) != EOK) { in SplitString()
/foundation/communication/wifi/wifi/relation_services/common/
H A Dwifi_hal_common_func.c47 int ConvertMacToStr(const unsigned char *mac, int macSize, char *macStr, int strLen) in ConvertMacToStr() argument
49 if (mac == NULL || macStr == NULL || macSize != MAC_UINT_SIZE || strLen <= MAC_STRING_SIZE) { in ConvertMacToStr()
58 if (snprintf_s(macStr, strLen, strLen - 1, "%02x:%02x:%02x:%02x:%02x:%02x", mac[posZero], mac[posOne], mac[posTwo], in ConvertMacToStr()
/foundation/arkui/ui_lite/frameworks/imgdecode/
H A Dcache_manager.cpp65 size_t strLen = strlen(path); in SetSrc() local
66 if (strLen > MAX_SRC_LENGTH) { in SetSrc()
69 char* newStr = static_cast<char*>(UIMalloc(static_cast<uint32_t>(strLen) + 1)); in SetSrc()
73 if (memcpy_s(newStr, strLen + 1, path, strLen) != EOK) { in SetSrc()
78 newStr[strLen] = '\0'; in SetSrc()
/foundation/graphic/graphic_2d/rosen/test/2d_graphics/unittest/text/
H A Dfont_mgr_test.cpp172 EXPECT_EQ(fullnameVec[0].strLen, sizeof(TTF_FULLNAME)); in HWTEST_F()
173 EXPECT_EQ(memcmp(fullnameVec[0].strData.get(), TTF_FULLNAME, fullnameVec[0].strLen), 0); in HWTEST_F()
194 EXPECT_EQ(fullnameVec[0].strLen, sizeof(OTF_FULLNAME)); in HWTEST_F()
195 EXPECT_EQ(memcmp(fullnameVec[0].strData.get(), OTF_FULLNAME, fullnameVec[0].strLen), 0); in HWTEST_F()
216 EXPECT_EQ(fullnameVec[0].strLen, sizeof(TTC_FULLNAME)); in HWTEST_F()
217 EXPECT_EQ(memcmp(fullnameVec[0].strData.get(), TTC_FULLNAME, fullnameVec[0].strLen), 0); in HWTEST_F()

Completed in 12 milliseconds

1234