/base/startup/hvb/libhvb/src/utils/ |
H A D | hvb_util.c | 77 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/notification/distributed_notification_service/services/distributed/test/unittest/mock/ |
H A D | mock_blob.cpp | 76 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/telephony/core_service/utils/codec/src/ |
H A D | asn1_utils.cpp | 43 // For swap adjacent bytes 58 TELEPHONY_LOGE("failed to transform uint data to bytes."); in IsConstructedTag() 105 // convert bytes array to string 112 void Asn1Utils::BcdToBytes(const std::string &bcd, std::vector<uint8_t> &bytes) in BcdToBytes() argument 115 bytes = HexStrToBytes(hexStr); in BcdToBytes() 118 std::string Asn1Utils::BytesToHexStr(const std::vector<uint8_t> &bytes) in BytesToHexStr() argument 120 if (bytes.size() > MAX_UINT16) { in BytesToHexStr() 124 for (size_t i = 0; i < bytes.size(); i++) { in BytesToHexStr() 125 oss << std::hex << std::uppercase << std::setw(BYTE_TO_HEX_LEN) << std::setfill('0') << (bytes[i] & MAX_UINT8); in BytesToHexStr() 169 uint32_t Asn1Utils::UintToBytes(const uint32_t value, std::vector<uint8_t> &bytes) in UintToBytes() argument 199 std::vector<uint8_t> bytes = {}; StrToHexStr() local 210 std::vector<uint8_t> bytes = HexStrToBytes(inputHexStr); HexStrToString() local [all...] |
/drivers/hdf_core/framework/model/audio/usb/src/ |
H A D | audio_usb_validate_desc.c | 80 uint32_t AudioUsbCombineWord(uint8_t *bytes) in AudioUsbCombineWord() argument 82 // This data is composed of two bytes of data. in AudioUsbCombineWord() 83 return (*(bytes)) | ((uint32_t)(bytes)[AUDIO_USB_INDEX_1] << USB_SHIFT_SIZE_8); in AudioUsbCombineWord() 86 uint32_t AudioUsbCombineTriple(uint8_t *bytes) in AudioUsbCombineTriple() argument 88 // This data is composed of three bytes of data. in AudioUsbCombineTriple() 89 return AudioUsbCombineWord(bytes) | ((uint32_t)(bytes)[AUDIO_USB_INDEX_2] << USB_SHIFT_SIZE_16); in AudioUsbCombineTriple() 92 uint32_t AudioUsbCombineQuad(uint8_t *bytes) in AudioUsbCombineQuad() argument 94 // This data is composed of four bytes o in AudioUsbCombineQuad() 98 AudioUsbCombineBytes(uint8_t *bytes, int32_t size) AudioUsbCombineBytes() argument [all...] |
H A D | audio_usb_dma_ops.c | 920 struct AudioUsbDriver *audioUsbDriver, struct urb *urb, int offset, int stride, uint32_t bytes) in AudioUsbCopyToUrb() 929 if (audioUsbDriver->renderHwptr + bytes > audioUsbDriver->renderBufInfo.cirBufSize * stride) { in AudioUsbCopyToUrb() 934 (void)memcpy_s(urb->transfer_buffer + offset + bytes1, bytes - bytes1, in AudioUsbCopyToUrb() 935 (char *)audioUsbDriver->renderBufInfo.virtAddr, bytes - bytes1); in AudioUsbCopyToUrb() 937 (void)memcpy_s(urb->transfer_buffer + offset, bytes, in AudioUsbCopyToUrb() 938 (char *)audioUsbDriver->renderBufInfo.virtAddr + audioUsbDriver->renderHwptr, bytes); in AudioUsbCopyToUrb() 940 audioUsbDriver->renderHwptr += bytes; in AudioUsbCopyToUrb() 991 uint32_t frames, bytes; in AudioUsbPreparePlaybackUrb() local 1013 bytes = frames * ep->stride; in AudioUsbPreparePlaybackUrb() 1016 AudioUsbCopyToUrb(audioUsbDriver, urb, 0, stride, bytes); in AudioUsbPreparePlaybackUrb() 919 AudioUsbCopyToUrb( struct AudioUsbDriver *audioUsbDriver, struct urb *urb, int offset, int stride, uint32_t bytes) AudioUsbCopyToUrb() argument 1041 uint32_t frameSize, frames, bytes, oldptr, offset; AudioUsbRetireCaptureUrb() local [all...] |
/base/security/access_token/services/tokensyncmanager/include/remote/ |
H A D | soft_bus_channel.h | 38 unsigned char *bytes;
member 74 * @param bytes Data sent from the peer device.
79 void HandleDataReceived(int socket, const unsigned char *bytes, int length) override;
105 * @param bytes transfer data array
130 * @param bytes compressed data array
136 std::string Decompress(const unsigned char *bytes, const int length);
141 * @param bytes data array to transfer
147 int SendRequestBytes(const unsigned char *bytes, const int bytesLength);
153 * @param bytes data array to transfer
159 int SendResponseBytes(int socket, const unsigned char *bytes, cons [all...] |
H A D | rpc_channel.h | 51 * @param bytes Data sent from the peer device.
56 virtual void HandleDataReceived(int session, const unsigned char *bytes, int length)
in HandleDataReceived() argument
|
/base/telephony/ril_adapter/services/hril/src/ |
H A D | hril_base.cpp | 69 uint8_t *bytes = (uint8_t *)calloc(bytesLen, sizeof(uint8_t)); in ConvertHexStringToBytes() local 70 if (bytes == nullptr) { in ConvertHexStringToBytes() 71 TELEPHONY_LOGE("ConvertHexStringToBytes: cannot allocate memory for bytes string"); in ConvertHexStringToBytes() 81 free(bytes); in ConvertHexStringToBytes() 84 bytes[i / SIZE_VALUE] = ((hexCh1 << BIT_NUM) | hexCh2); in ConvertHexStringToBytes() 87 return bytes; in ConvertHexStringToBytes()
|
/base/telephony/core_service/utils/codec/include/ |
H A D | asn1_utils.h | 33 static void BcdToBytes(const std::string &bcd, std::vector<uint8_t> &bytes); 34 static std::string BytesToHexStr(const std::vector<uint8_t> &bytes); 36 static uint32_t UintToBytes(const uint32_t value, std::vector<uint8_t> &bytes);
|
/base/notification/distributed_notification_service/frameworks/test/moduletest/mock/ |
H A D | blob.cpp | 80 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/ |
H A D | blob.cpp | 80 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/ |
H A D | blob.cpp | 80 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/telephony/core_service/services/sim/src/ |
H A D | plmn_file.cpp | 19 PlmnFile::PlmnFile(unsigned char *bytes, int offset) in PlmnFile() argument 22 const char *plmnData = reinterpret_cast<const char *>(bytes); in PlmnFile()
|
H A D | sim_utils.cpp | 63 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()
|
/drivers/hdf_core/framework/model/audio/usb/include/ |
H A D | audio_usb_validate_desc.h | 21 uint32_t AudioUsbCombineTriple(uint8_t *bytes); 26 uint32_t AudioUsbCombineBytes(uint8_t *bytes, int32_t size);
|
/base/security/access_token/services/tokensyncmanager/src/remote/ |
H A D | soft_bus_channel.cpp | 181 info.bytes = buf; in ExecuteCommand() 212 void SoftBusChannel::HandleDataReceived(int socket, const unsigned char *bytes, int length) in HandleDataReceived() argument 222 std::string receiveData = Decompress(bytes, length); in HandleDataReceived() 224 ACCESSTOKEN_LOG_ERROR(LABEL, "Invalid parameter bytes"); in HandleDataReceived() 269 return Compress(json, info.bytes, info.bytesLength); in PrepareBytes() 289 ACCESSTOKEN_LOG_DEBUG(LABEL, "Compress complete. compress %{public}d bytes to %{public}d", compressedLength, in Compress() 295 std::string SoftBusChannel::Decompress(const unsigned char *bytes, const int length) in Decompress() argument 305 int result = uncompress(buf, &len, const_cast<unsigned char *>(bytes), length); in Decompress() 319 int SoftBusChannel::SendRequestBytes(const unsigned char *bytes, const int bytesLength) in SendRequestBytes() argument 336 int result = ::SendBytes(socketFd_, bytes, bytesLengt in SendRequestBytes() 444 SendResponseBytes(int socket, const unsigned char *bytes, const int bytesLength) SendResponseBytes() argument [all...] |
/base/telephony/core_service/utils/vcard/src/contact_data/ |
H A D | vcard_photo_data.cpp | 70 void VCardPhotoData::SetBytes(const std::string &bytes) in SetBytes() argument 72 bytes_ = bytes; in SetBytes()
|
/drivers/hdf_core/framework/test/unittest/platform/virtual/ |
H A D | spi_virtual.c | 130 uint8_t bytes = VirtualSpiToByteWidth(virtual->cfg.bitsPerWord); in VirtualSpiWriteFifo() local 137 for (value = 0; count >= bytes; count -= bytes) { in VirtualSpiWriteFifo() 139 value = (bytes == ONE_BYTE) ? *tx : *((uint16_t *)tx); in VirtualSpiWriteFifo() 140 tx += bytes; in VirtualSpiWriteFifo() 152 uint8_t bytes = VirtualSpiToByteWidth(virtual->cfg.bitsPerWord); in VirtualSpiReadFifo() local 159 for (value = 0; count >= bytes; count -= bytes) { in VirtualSpiReadFifo() 167 if (bytes == ONE_BYTE) { in VirtualSpiReadFifo() 172 rx += bytes; in VirtualSpiReadFifo() [all...] |
/base/telephony/core_service/interfaces/innerkits/include/ |
H A D | tel_ril_sms_parcel.h | 178 /** Number of PDU bytes. */ 249 unsigned char bytes[36] = { 0 }; member 256 unsigned char bytes[36] = { 0 }; member 267 unsigned char bytes[255] = { 0 }; member
|
/base/telephony/ril_adapter/interfaces/innerkits/include/ |
H A D | hril_vendor_sms_defs.h | 164 * Number of PDU bytes 179 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/ |
H A D | vcard_utils.cpp | 509 std::string VCardUtils::GetImageType(std::string bytes) in GetImageType() argument 511 if (bytes.empty()) { in GetImageType() 514 int32_t length = static_cast<int32_t>(bytes.length()); in GetImageType() 516 if (length >= gifTypeLength && bytes[VALUE_INDEX_ZERO] == 'G' && bytes[1] == 'I' && bytes[VALUE_INDEX_TWO] == 'F') { in GetImageType() 520 if (length >= pngTypeLength && bytes[VALUE_INDEX_ZERO] == static_cast<char>(0x89) && in GetImageType() 521 bytes[VALUE_INDEX_ONE] == 'P' && bytes[VALUE_INDEX_TWO] == 'N' && bytes[VALUE_INDEX_THRE in GetImageType() [all...] |
/base/security/asset/test/unittest/inner_kits_rust/src/ |
H A D | add.rs | 82 let bytes = res[0].get_bytes_attr(&Tag::Secret).unwrap(); in add_english_secret() 83 assert_eq!(func_name, String::from_utf8(bytes.to_owned()).unwrap()); in add_english_secret() 99 let bytes = res[0].get_bytes_attr(&Tag::Secret).unwrap(); in add_chinese_secret() 100 assert_eq!(secret, String::from_utf8(bytes.to_owned()).unwrap()); in add_chinese_secret() 101 let bytes = res[0].get_bytes_attr(&Tag::Alias).unwrap(); in add_chinese_secret() 102 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/ |
H A D | chain_rule.cpp | 30 uint64_t bytes = 0; in ChainRule() local 31 iss >> bytes; in ChainRule() local
|
/base/security/access_token/services/tokensyncmanager/test/mock/src/ |
H A D | soft_bus_socket_mock.cpp | 50 void DecompressMock(const unsigned char *bytes, const int length) in DecompressMock() argument 60 int result = uncompress(buf, &len, const_cast<unsigned char *>(bytes), length); in DecompressMock() 98 ACCESSTOKEN_LOG_DEBUG(LABEL, "compress complete. compress %{public}d bytes to %{public}d", compressedLength, in CompressMock()
|
/base/telephony/core_service/services/sim/include/ |
H A D | sim_utils.h | 75 static std::string BytesConvertToHexString(const unsigned char *bytes, int byteLen); 85 static std::string Gsm7bitConvertToString(const unsigned char *bytes, int byteLen);
|