Home
last modified time | relevance | path

Searched refs:bytes (Results 1 – 25 of 66) sorted by relevance

123

/base/startup/hvb/libhvb/src/utils/
Dhvb_util.c77 uint8_t bytes[8]; in hvb_htobe64() member
80 ret.bytes[0] = (data >> 56) & 0xff; in hvb_htobe64()
81 ret.bytes[1] = (data >> 48) & 0xff; in hvb_htobe64()
82 ret.bytes[2] = (data >> 40) & 0xff; in hvb_htobe64()
83 ret.bytes[3] = (data >> 32) & 0xff; in hvb_htobe64()
84 ret.bytes[4] = (data >> 24) & 0xff; in hvb_htobe64()
85 ret.bytes[5] = (data >> 16) & 0xff; in hvb_htobe64()
86 ret.bytes[6] = (data >> 8) & 0xff; in hvb_htobe64()
87 ret.bytes[7] = data & 0xff; in hvb_htobe64()
/base/hiviewdfx/faultloggerd/test/resource/testdata/
Dehdr_from_readelf_3212 程序头起点: 52 (bytes into file)
13 Start of section headers: 17580 (bytes into file)
15 Size of this header: 52 (bytes)
16 Size of program headers: 32 (bytes)
18 Size of section headers: 40 (bytes)
Dehdr_from_readelf_6412 程序头起点: 64 (bytes into file)
13 Start of section headers: 22296 (bytes into file)
15 Size of this header: 64 (bytes)
16 Size of program headers: 56 (bytes)
18 Size of section headers: 64 (bytes)
/base/hiviewdfx/hisysevent/interfaces/rust/src/
Dsys_event.rs178 let mut bytes = value_type.as_bytes(); in parse_type_len() localVariable
179 if bytes[0] == b'&' { in parse_type_len()
181 bytes = value_type.as_bytes(); in parse_type_len()
183 if bytes[0] != b'[' { in parse_type_len()
185 if bytes[0] == b'&' { in parse_type_len()
195 for (i, &item) in bytes.iter().enumerate() { in parse_type_len()
204 let array_len = value_type[len_start..(bytes.len() - 1)] in parse_type_len()
207 if bytes[1] == b'&' { in parse_type_len()
/base/update/update_app/common/src/main/ets/util/
DFormatUtils.ts34 export function formatFileSize(bytes: number, decimalPoint = DECIMAL_POINT): string {
35 if (bytes <= 0) {
42 let data: number = Math.min(bytes, MAX_BYTES);
46 return parseFloat((bytes / Math.pow(ONE_KB, index)).toFixed(point)) + ' ' + sizes[index];
/base/notification/distributed_notification_service/services/distributed/test/unittest/mock/
Dmock_blob.cpp76 Blob::Blob(const std::vector<uint8_t> &bytes) : blob_(bytes) in Blob() argument
79 Blob::Blob(std::vector<uint8_t> &&bytes) : blob_(std::move(bytes)) in Blob() argument
/base/security/asset/services/core_service/src/operations/
Dcommon.rs122 Some(Value::Bytes(bytes)) => aad.extend(bytes), in build_aad_v1()
131 fn to_hex(bytes: &Vec<u8>) -> Result<Vec<u8>> { in to_hex()
132 let bytes_len = bytes.len(); in to_hex()
139 for byte in bytes.iter() { in to_hex()
150 Some(Value::Bytes(bytes)) => aad.extend(to_hex(bytes)?), in build_aad_v2()
/base/security/access_token/services/tokensyncmanager/include/remote/
Dsoft_bus_channel.h38 unsigned char *bytes; member
79 void HandleDataReceived(int socket, const unsigned char *bytes, int length) override;
136 std::string Decompress(const unsigned char *bytes, const int length);
147 int SendRequestBytes(const unsigned char *bytes, const int bytesLength);
159 int SendResponseBytes(int socket, const unsigned char *bytes, const int bytesLength);
/base/telephony/ril_adapter/services/hril/src/
Dhril_base.cpp69 uint8_t *bytes = (uint8_t *)calloc(bytesLen, sizeof(uint8_t)); in ConvertHexStringToBytes() local
70 if (bytes == nullptr) { in ConvertHexStringToBytes()
81 free(bytes); in ConvertHexStringToBytes()
84 bytes[i / SIZE_VALUE] = ((hexCh1 << BIT_NUM) | hexCh2); in ConvertHexStringToBytes()
87 return bytes; in ConvertHexStringToBytes()
/base/notification/distributed_notification_service/frameworks/test/moduletest/mock/
Dblob.cpp80 Blob::Blob(const std::vector<uint8_t> &bytes) in Blob() argument
81 : blob_(bytes) in Blob()
85 Blob::Blob(std::vector<uint8_t> &&bytes) in Blob() argument
86 : blob_(std::move(bytes)) in Blob()
/base/notification/distributed_notification_service/services/test/moduletest/mock/
Dblob.cpp80 Blob::Blob(const std::vector<uint8_t> &bytes) in Blob() argument
81 : blob_(bytes) in Blob()
85 Blob::Blob(std::vector<uint8_t> &&bytes) in Blob() argument
86 : blob_(std::move(bytes)) in Blob()
/base/notification/distributed_notification_service/services/ans/test/unittest/mock/
Dblob.cpp80 Blob::Blob(const std::vector<uint8_t> &bytes) in Blob() argument
81 : blob_(bytes) in Blob()
85 Blob::Blob(std::vector<uint8_t> &&bytes) in Blob() argument
86 : blob_(std::move(bytes)) in Blob()
/base/security/access_token/services/tokensyncmanager/src/remote/
Dsoft_bus_channel.cpp176 info.bytes = buf; in ExecuteCommand()
207 void SoftBusChannel::HandleDataReceived(int socket, const unsigned char *bytes, int length) in HandleDataReceived() argument
217 std::string receiveData = Decompress(bytes, length); in HandleDataReceived()
259 return Compress(json, info.bytes, info.bytesLength); in PrepareBytes()
285 std::string SoftBusChannel::Decompress(const unsigned char *bytes, const int length) in Decompress() argument
295 int result = uncompress(buf, &len, const_cast<unsigned char *>(bytes), length); in Decompress()
309 int SoftBusChannel::SendRequestBytes(const unsigned char *bytes, const int bytesLength) in SendRequestBytes() argument
326 int result = ::SendBytes(socketFd_, bytes, bytesLength); in SendRequestBytes()
383 info.bytes = sendbuf; in HandleRequest()
412 info.bytes = buf; in HandleRequest()
[all …]
/base/telephony/core_service/services/sim/src/
Dsim_utils.cpp63 std::string SIMUtils::BytesConvertToHexString(const unsigned char *bytes, int byteLen) in BytesConvertToHexString() argument
65 if (bytes == nullptr) { in BytesConvertToHexString()
71 b = 0x0f & (bytes[i] >> HALF_BYTE_LEN); in BytesConvertToHexString()
73 b = 0x0f & bytes[i]; in BytesConvertToHexString()
159 std::string SIMUtils::Gsm7bitConvertToString(const unsigned char *bytes, int byteLen) in Gsm7bitConvertToString() argument
173 str.push_back(bytes[pos] & (~(0xFF << (CHAR_GSM_7BIT)))); in Gsm7bitConvertToString()
176 str.push_back((bytes[pos] & (0xFF << (BYTE_LENGTH - left))) >> (BYTE_LENGTH - left)); in Gsm7bitConvertToString()
180 … low = (bytes[pos] & (unsigned char)(0xFF << (BYTE_LENGTH - left))) >> (BYTE_LENGTH - left); in Gsm7bitConvertToString()
181 high = (bytes[pos + 1] & (unsigned char)(~(0xFF << (CHAR_GSM_7BIT - left)))) << left; in Gsm7bitConvertToString()
Dplmn_file.cpp19 PlmnFile::PlmnFile(unsigned char *bytes, int offset) in PlmnFile() argument
22 const char *plmnData = reinterpret_cast<const char *>(bytes); in PlmnFile()
/base/telephony/ril_adapter/interfaces/innerkits/include/
Dhril_sms_parcel.h248 unsigned char bytes[36] = { 0 }; member
255 unsigned char bytes[36] = { 0 }; member
266 unsigned char bytes[255] = { 0 }; member
Dhril_vendor_sms_defs.h179 unsigned char bytes[HRIL_MAX_CDMA_ADDRESS_LEN]; member
186 unsigned char bytes[HRIL_MAX_CDMA_ADDRESS_LEN]; member
196 unsigned char bytes[HRIL_MAX_CDMA_MESSAGE_LEN]; member
/base/telephony/core_service/utils/vcard/src/
Dvcard_utils.cpp504 std::string VCardUtils::GetImageType(std::string bytes) in GetImageType() argument
506 if (bytes.empty()) { in GetImageType()
509 int32_t length = static_cast<int32_t>(bytes.length()); in GetImageType()
511 …if (length >= gifTypeLength && bytes[VALUE_INDEX_ZERO] == 'G' && bytes[1] == 'I' && bytes[VALUE_IN… in GetImageType()
515 if (length >= pngTypeLength && bytes[VALUE_INDEX_ZERO] == static_cast<char>(0x89) && in GetImageType()
516bytes[VALUE_INDEX_ONE] == 'P' && bytes[VALUE_INDEX_TWO] == 'N' && bytes[VALUE_INDEX_THREE] == 'G')… in GetImageType()
520 if (length >= jpgTypeLength && bytes[VALUE_INDEX_ZERO] == static_cast<char>(0xff) && in GetImageType()
521 bytes[VALUE_INDEX_ONE] == static_cast<char>(0xd8)) { in GetImageType()
/base/telephony/core_service/utils/vcard/src/contact_data/
Dvcard_photo_data.cpp68 void VCardPhotoData::SetBytes(const std::string &bytes) in SetBytes() argument
70 bytes_ = bytes; in SetBytes()
/base/hiviewdfx/hitrace/test/unittest/common/native/
Dhitracechainc_test.cpp181 uint8_t bytes[idLen + 1]; variable
182 int len = HiTraceChainIdToBytes(&id, bytes, idLen - 1);
184 len = HiTraceChainIdToBytes(&id, bytes, idLen + 1);
186 len = HiTraceChainIdToBytes(&id, bytes, idLen);
188 PRINT_ID(reinterpret_cast<HiTraceIdStruct*>(bytes));
191 HiTraceIdStruct bytesToId = HiTraceChainBytesToId(bytes, idLen - 1);
193 bytesToId = HiTraceChainBytesToId(bytes, idLen + 1);
195 bytesToId = HiTraceChainBytesToId(bytes, idLen);
206 EXPECT_EQ(0, HiTraceChainIdToBytes(&invalidId, bytes, idLen));
Dhitracechaincpp_test.cpp154 uint8_t bytes[ID_LEN + 1]; variable
155 int len = initId.ToBytes(bytes, ID_LEN - 1);
157 len = initId.ToBytes(bytes, ID_LEN + 1);
159 len = initId.ToBytes(bytes, ID_LEN);
163 HiTraceId bytesToId = HiTraceId(bytes, ID_LEN - 1);
165 bytesToId = HiTraceId(bytes, ID_LEN + 1);
167 bytesToId = HiTraceId(bytes, ID_LEN);
176 EXPECT_EQ(0, invalidId.ToBytes(bytes, ID_LEN));
/base/telephony/core_service/services/sim/include/
Dsim_utils.h75 static std::string BytesConvertToHexString(const unsigned char *bytes, int byteLen);
85 static std::string Gsm7bitConvertToString(const unsigned char *bytes, int byteLen);
/base/security/asset/test/unittest/inner_api_rust/src/
Dadd.rs78 let bytes = res[0].get_bytes_attr(&Tag::Secret).unwrap(); in add_english_secret() localVariable
79 assert_eq!(func_name, String::from_utf8(bytes.to_owned()).unwrap()); in add_english_secret()
95 let bytes = res[0].get_bytes_attr(&Tag::Secret).unwrap(); in add_chinese_secret() localVariable
96 assert_eq!(secret, String::from_utf8(bytes.to_owned()).unwrap()); in add_chinese_secret()
97 let bytes = res[0].get_bytes_attr(&Tag::Alias).unwrap(); in add_chinese_secret() localVariable
98 assert_eq!(alias, String::from_utf8(bytes.to_owned()).unwrap()); in add_chinese_secret()
/base/customization/enterprise_device_management/services/edm_plugin/src/network/rule/
Dchain_rule.cpp30 uint64_t bytes = 0; in ChainRule() local
31 iss >> bytes; in ChainRule()
/base/hiviewdfx/hitrace/interfaces/native/innerkits/src/
Dhitrace_meter.cpp154 int bytes = snprintf_s(buf, sizeof(buf), sizeof(buf) - 1, "[%llx,%llx,%llx]#", in AddTraceMarkerLarge() local
156 if (EXPECTANTLY(bytes > 0)) { in AddTraceMarkerLarge()
188 int bytes = 0; in AddHitraceMeterMarker() local
190 bytes = isHiTraceIdValid ? snprintf_s(buf, sizeof(buf), sizeof(buf) - 1, in AddHitraceMeterMarker()
195 bytes = snprintf_s(buf, sizeof(buf), sizeof(buf) - 1, in AddHitraceMeterMarker()
199 bytes = isHiTraceIdValid ? snprintf_s(buf, sizeof(buf), sizeof(buf) - 1, in AddHitraceMeterMarker()
205 WriteToTraceMarker(buf, bytes); in AddHitraceMeterMarker()

123