/foundation/multimedia/image_framework/frameworks/innerkitsimpl/accessor/src/ |
H A D | data_buf.cpp | 58 DataBuf::DataBuf(const byte *pData, size_t size) : pData_(size) in DataBuf() 128 byte *DataBuf::Data(size_t offset) in Data() 130 return const_cast<byte *>(CData(offset)); in Data() 133 const byte *DataBuf::CData(size_t offset) const in CData() 147 uint16_t GetUShort(const byte *buf, ByteOrder byteOrder) in GetUShort() 150 return static_cast<byte>(buf[1]) << DATA_BUF_BYTE_SIZE | static_cast<byte>(buf[0]); in GetUShort() 152 return static_cast<byte>(buf[0]) << DATA_BUF_BYTE_SIZE | static_cast<byte>(buf[1]); in GetUShort() 155 void US2Data(byte *bu [all...] |
H A D | jpeg_exif_metadata_accessor.cpp | 35 using uint_8 = byte; 36 constexpr byte JPEG_MARKER_APP0 = 0xe0; 37 constexpr byte JPEG_MARKER_APP1 = 0xe1; 38 constexpr byte JPEG_MARKER_SOI = 0xd8; 39 constexpr byte JPEG_MARKER_EOI = 0xd9; 40 constexpr byte JPEG_MARKER_RST1 = 0xd0; 41 constexpr byte JPEG_MARKER_SOS = 0xda; 143 byte *dataBlob = nullptr; in WriteBlob() 173 bool HasLength(byte marker) in HasLength() 181 std::pair<std::array<byte, [all...] |
H A D | metadata_accessor_factory.cpp | 39 const byte jpegHeader[] = { 0xff, 0xd8, 0xff }; 40 const byte pngHeader[] = { 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A }; 41 const byte webpHeader[] = { 0x57, 0x45, 0x42, 0x50 }; 42 const byte riffHeader[] = { 0x52, 0x49, 0x46, 0x46 }; 43 const byte heifHeader[] = { 0x66, 0x74, 0x79, 0x70 }; 44 const byte DNG_LITTLE_ENDIAN_HEADER[] = { 0x49, 0x49, 0x2A, 0x00 }; 45 const byte DNG_BIG_ENDIAN_HEADER[] = { 0x4D, 0x4D, 0x00, 0x2A }; 125 byte buff[IMAGE_HEADER_SIZE] = {0}; in GetImageType() 126 auto byteSize = static_cast<uint32_t>(sizeof(byte)); in GetImageType()
|
H A D | buffer_metadata_stream.cpp | 49 BufferMetadataStream::BufferMetadataStream(byte *originData, size_t size, MemoryMode mode, in BufferMetadataStream() 89 byte *newBuffer = new (std::nothrow) byte[newCapacity]; in Write() 234 byte *BufferMetadataStream::GetAddr(bool isWriteable) in GetAddr() 266 buffer_ = new (std::nothrow) byte[estimatedSize]; in CopyFrom() 291 byte *tempBuffer = new (std::nothrow) byte[buffer_size]; in ReadAndWriteData() 327 byte *BufferMetadataStream::Release() in Release() 329 byte *ret = buffer_; in Release()
|
/foundation/multimedia/image_framework/frameworks/innerkitsimpl/accessor/include/ |
H A D | data_buf.h | 27 using byte = uint8_t; 32 // Type to express the byte order (little or big endian) 40 using Blob = std::vector<byte>; 49 using ByteVector = std::vector<byte>; 65 * Constructor to create a buffer from a byte array 66 * @param pData Pointer to the byte array 67 * @param size Size of the byte array 69 DataBuf(const byte *pData, size_t size); 144 * @param byteOrder The byte order to use when reading the value 153 * @param byteOrder The byte orde [all...] |
H A D | buffer_metadata_stream.h | 61 BufferMetadataStream(byte *originData, size_t size, MemoryMode mode, 89 * @brief Reads a byte from the BufferMetadataStream. 90 * @return The byte read. 153 virtual byte *GetAddr(bool isWriteable = false) override; 180 byte *Release(); 232 byte *buffer_; 238 byte *originData_;
|
H A D | metadata_stream.h | 36 using byte = uint8_t; 114 virtual ssize_t Write(byte *data, ssize_t size) = 0; 122 virtual ssize_t Read(byte *buf, ssize_t size) = 0; 125 * @brief Reads a byte from the image stream and moves the pointer to the next position. 126 * @return The byte read from the stream as a uint8_t. Returns -1 if an error occurred. 158 virtual byte *GetAddr(bool isWriteable = false) = 0;
|
H A D | tiff_parser.h | 34 using uint_8 = byte; 50 static size_t FindTiffPos(const byte *dataBuf, size_t bufLength);
|
H A D | file_metadata_stream.h | 99 virtual ssize_t Write(byte *data, ssize_t size) override; 108 virtual ssize_t Read(byte *buf, ssize_t size) override; 111 * @brief Reads a byte from the FileMetadataStream. 112 * @return The byte read. 170 virtual byte *GetAddr(bool isWriteable = false) override; 254 bool ReadFromSourceAndWriteToFile(MetadataStream &src, byte *tempBuffer, ssize_t buffer_size,
|
/foundation/ability/ability_base/test/unittest/base/ |
H A D | byte_wrapper_test.cpp | 45 byte value = 0x00;
in HWTEST_F() 58 byte value = 0x00;
in HWTEST_F() 70 byte value = 0x00;
in HWTEST_F() 72 byte result = by.Unbox(by.Box(value));
in HWTEST_F() 83 byte value = 0x00;
in HWTEST_F() 85 byte result = by.Unbox(by.Parse("0x00"));
in HWTEST_F() 96 byte value = 0x01;
in HWTEST_F() 98 byte result = by.Unbox(by.Parse("0x01"));
in HWTEST_F()
|
/base/security/dlp_permission_service/frameworks/common/src/ |
H A D | hex_string.cpp | 31 int32_t ByteToHexString(const uint8_t *byte, uint32_t byteLen, char *hexStr, uint32_t hexLen) in ByteToHexString() argument 33 if (byte == nullptr || hexStr == nullptr) { in ByteToHexString() 45 hexStr[i * BYTE_TO_HEX_OPER_LENGTH] = HexToChar((byte[i] & 0xF0) >> 4); // 4: shift right for filling in ByteToHexString() 46 hexStr[i * BYTE_TO_HEX_OPER_LENGTH + 1] = HexToChar(byte[i] & 0x0F); // get low four bits in ByteToHexString() 67 int32_t HexStringToByte(const char *hexStr, uint32_t hexStrLen, uint8_t *byte, uint32_t byteLen) in HexStringToByte() argument 69 if (byte == nullptr || hexStr == nullptr || hexStrLen == 0) { in HexStringToByte() 83 byte[i] = high << 4; // 4: Set the high nibble in HexStringToByte() 84 byte[i] |= low; // Set the low nibble in HexStringToByte()
|
/base/telephony/sms_mms/frameworks/native/mms/src/utils/ |
H A D | mms_quoted_printable.cpp | 36 for (auto byte : input) {
in Encode() 37 if ((byte >= asciiMin && byte < equalChar) || (byte > equalChar && byte <= assciiMax)) {
in Encode() 38 codeString += byte;
in Encode() 41 codeString += hex[((byte >> 0x04) & 0x0F)];
in Encode() 42 codeString += hex[(byte & 0x0F)];
in Encode()
|
/foundation/ability/ability_base/interfaces/inner_api/base/include/ |
H A D | byte_wrapper.h | 25 Byte(byte value) : value_(value) in Byte() 33 ErrCode GetValue(byte &value) override; /* [out] */ 39 static sptr<IByte> Box(byte value); /* [in] */ 41 static byte Unbox(IByte *object); /* [in] */ 49 byte value_;
|
/foundation/ability/ability_base/interfaces/inner_api/base/src/ |
H A D | byte_wrapper.cpp | 22 ErrCode Byte::GetValue(byte &value) /* [out] */ in GetValue() 41 sptr<IByte> Byte::Box(byte value) /* [in] */ in Box() 47 byte Byte::Unbox(IByte *object) /* [in] */ in Unbox() 49 byte value; in Unbox() 58 byte value = (byte)std::stoi(str, &idx); in Parse()
|
/base/security/device_auth/common_lib/impl/src/ |
H A D | string_util.c | 35 int32_t ByteToHexString(const uint8_t *byte, uint32_t byteLen, char *hexStr, uint32_t hexLen)
in ByteToHexString() argument 37 if (byte == NULL || hexStr == NULL) {
in ByteToHexString() 46 hexStr[i * BYTE_TO_HEX_OPER_LENGTH] = HexToChar((byte[i] & 0xF0) >> 4); /* 4: shift right for filling */
in ByteToHexString() 47 hexStr[i * BYTE_TO_HEX_OPER_LENGTH + 1] = HexToChar(byte[i] & 0x0F); /* get low four bits */
in ByteToHexString() 67 int32_t HexStringToByte(const char *hexStr, uint8_t *byte, uint32_t byteLen)
in HexStringToByte() argument 69 if (byte == NULL || hexStr == NULL) {
in HexStringToByte() 84 byte[i] = high << 4; /* 4: Set the high nibble */
in HexStringToByte() 85 byte[i] |= low; /* Set the low nibble */
in HexStringToByte()
|
/foundation/multimedia/image_framework/frameworks/innerkitsimpl/test/unittest/image_source_test/ |
H A D | metadata_stream_test.cpp | 304 byte data[SIZE_10] = {0}; in HWTEST_F() 322 byte buffer[SIZE_10]; in HWTEST_F() 344 byte data[SIZE_10] = {0}; in HWTEST_F() 366 byte buffer[SIZE_1024]; in HWTEST_F() 384 byte buffer[METADATA_STREAM_PAGE_SIZE]; in HWTEST_F() 389 byte *buf = new byte[stream1.GetSize()]; in HWTEST_F() 421 byte *buf = new byte[sourceStream.GetSize()]; in HWTEST_F() 446 ASSERT_EQ(stream.Write((byte *)dat in HWTEST_F() [all...] |
H A D | data_buf_test.cpp | 51 byte buf[2] = {0x01, 0x02}; in HWTEST_F() 70 byte buf[2]; in HWTEST_F() 92 byte buf[4]; in HWTEST_F() 118 byte buf[4] = {0x01, 0x02, 0x03, 0x04}; in HWTEST_F()
|
/base/security/device_security_level/baselib/utils/src/ |
H A D | utils_base64.c | 84 uint32_t byte = (((a << 16) & 0x00FF0000) | ((b << 8) & 0x0000FF00) | ((c << 0) & 0x000000FF)); /* 16, 8 */ in Base64Encode() local 86 to[j++] = g_base64EncodeTable[(byte >> 18) & 0x3F]; /* get the 1st block by shift 18 */ in Base64Encode() 87 to[j++] = g_base64EncodeTable[(byte >> 12) & 0x3F]; /* get the 2nd block by shift 12 */ in Base64Encode() 88 to[j++] = g_base64EncodeTable[(byte >> 6) & 0x3F]; /* get the 3rd block by shift 6 */ in Base64Encode() 89 to[j++] = g_base64EncodeTable[(byte >> 0) & 0x3F]; in Base64Encode() 144 uint32_t byte = in Base64Decode() local 148 to[j++] = (byte >> 16) & 0xFF; // 16, the 3rd 8-bit in Base64Decode() 151 to[j++] = (byte >> 8) & 0xFF; // 8, the 2nd 8-bit in Base64Decode() 154 to[j++] = (byte >> 0) & 0xFF; in Base64Decode()
|
/foundation/communication/wifi/wifi/services/wifi_standard/wifi_framework/wifi_toolkit/utils/ |
H A D | wifi_randommac_helper.cpp | 166 unsigned long long WifiRandomMacHelper::BytesToLonglong(const std::vector<uint8_t> &byte)
in BytesToLonglong() argument 168 if (byte.size() != LONG_TO_BYTE_SIZE) {
in BytesToLonglong() 169 WIFI_LOGI("%{public}s byte size is invalid :%{public}zu", __func__, byte.size());
in BytesToLonglong() 174 (((unsigned long long)byte[OFFSET_VALUE_0] << OFFSET_VALUE_56) & 0xFF00000000000000L) |
in BytesToLonglong() 175 (((unsigned long long)byte[OFFSET_VALUE_1] << OFFSET_VALUE_48) & 0xFF000000000000L) |
in BytesToLonglong() 176 (((unsigned long long)byte[OFFSET_VALUE_2] << OFFSET_VALUE_40) & 0xFF0000000000L) |
in BytesToLonglong() 177 (((unsigned long long)byte[OFFSET_VALUE_3] << OFFSET_VALUE_32) & 0xFF00000000L) |
in BytesToLonglong() 178 (((unsigned long long)byte[OFFSET_VALUE_4] << OFFSET_VALUE_24) & 0xFF000000L)|
in BytesToLonglong() 179 (((unsigned long long)byte[OFFSET_VALUE_ in BytesToLonglong() [all...] |
/foundation/graphic/graphic_3d/lume/LumeBase/api/base/util/ |
H A D | utf8_decode.h | 48 constexpr inline uint32_t decode(uint32_t* state, uint32_t* codep, unsigned char byte) in decode() argument 50 uint32_t type = utf8d[byte]; in decode() 52 *codep = (*state != UTF8_ACCEPT) ? (byte & 0x3fu) | (*codep << 6) : (0xff >> type) & (byte); in decode()
|
/foundation/CastEngine/castengine_wifi_display/tests/demo/rtp/ |
H A D | ts_rtp_dec_demo.cpp | 56 int byte = 0; in StartRtpServer() local 68 byte = recvfrom(listenfd, buf, BUF_SIZE, 0, (struct sockaddr *)&clientaddr, &len); in StartRtpServer() 69 if (byte == 0) { in StartRtpServer() 73 if (byte < 0) { in StartRtpServer() 77 cb(buf, byte); in StartRtpServer()
|
H A D | h264_rtp_dec_demo.cpp | 57 int byte = 0; in StartRtpServer() local 69 byte = recvfrom(listenfd, buf, BUF_SIZE, 0, (struct sockaddr *)&clientaddr, &len); in StartRtpServer() 70 if (byte == 0) { in StartRtpServer() 74 if (byte < 0) { in StartRtpServer() 79 byte, buf); in StartRtpServer() 80 cb(buf, byte); in StartRtpServer()
|
/base/security/dlp_permission_service/frameworks/common/include/ |
H A D | hex_string.h | 25 int32_t ByteToHexString(const uint8_t *byte, uint32_t byteLen, char *hexStr, uint32_t hexLen); 26 int32_t HexStringToByte(const char *hexStr, uint32_t hexStrLen, uint8_t *byte, uint32_t byteLen);
|
/base/security/device_auth/common_lib/interfaces/ |
H A D | string_util.h | 38 * Convert hex string to byte.
40 * @param byte: the converted result, need malloc by caller
41 * @param byteLen: the length of byte, must be not shorter than strlen(hexStr) / 2
44 int32_t HexStringToByte(const char *hexStr, uint8_t *byte, uint32_t byteLen);
47 * Convert byte to hex string.
48 * @param byte: byte to be converted
49 * @param byteLen: the length of byte
54 int32_t ByteToHexString(const uint8_t *byte, uint32_t byteLen, char *hexStr, uint32_t hexLen);
|
/base/security/device_auth/deps_adapter/key_management_adapter/impl/inc/ |
H A D | mbedtls_ec_adapter.h | 33 int32_t MbedtlsBase64Encode(const uint8_t *byte, uint32_t byteLen, char *base64Str, uint32_t strLen, uint32_t *outLen);
34 int32_t MbedtlsBase64Decode(const char *base64Str, uint32_t strLen, uint8_t *byte, uint32_t byteLen, uint32_t *outLen);
|