Home
last modified time | relevance | path

Searched refs:byte_string (Results 1 – 25 of 79) sorted by relevance

1234

/aosp_15_r20/external/autotest/client/cros/
H A Ddhcp_packet.py85 def unpack(byte_string): argument
86 return struct.unpack(field_format, byte_string)[0]
119 def unpack(byte_string): argument
120 return socket.inet_ntoa(byte_string)
129 def unpack(byte_string): argument
130 return [socket.inet_ntoa(byte_string[idx:idx+4])
131 for idx in range(0, len(byte_string), 4)]
140 def unpack(byte_string): argument
141 return get_string(byte_string)
152 def unpack(byte_string): argument
[all …]
H A Ddhcp_unittest.py93 byte_string = dhcp_packet.ClasslessStaticRoutesOption.pack(
95 if byte_string != TEST_CLASSLESS_STATIC_ROUTE_DATA:
97 pretty_actual = bin2hex(byte_string, 100)
119 byte_string = dhcp_packet.DomainListOption.pack(
121 if byte_string != TEST_DOMAIN_SEARCH_LIST_EXPECTED:
123 pretty_actual = bin2hex(byte_string, 100)
132 byte_string = b'\x00' * 240 + TEST_DOMAIN_SEARCH_LIST1 + TEST_DOMAIN_SEARCH_LIST2 + b'\xff'
133 packet = dhcp_packet.DhcpPacket(byte_str=byte_string)
/aosp_15_r20/external/pdfium/core/fxcrt/
H A Dbytestring_unittest.cpp266 ByteString byte_string("hello"); in TEST() local
267 EXPECT_TRUE(byte_string == byte_string); in TEST()
268 EXPECT_FALSE(byte_string == null_string); in TEST()
269 EXPECT_FALSE(byte_string == empty_string); in TEST()
270 EXPECT_FALSE(byte_string == deleted_string); in TEST()
271 EXPECT_FALSE(null_string == byte_string); in TEST()
272 EXPECT_FALSE(empty_string == byte_string); in TEST()
273 EXPECT_FALSE(deleted_string == byte_string); in TEST()
276 EXPECT_TRUE(byte_string == byte_string_same1); in TEST()
277 EXPECT_TRUE(byte_string_same1 == byte_string); in TEST()
[all …]
/aosp_15_r20/external/python/asn1crypto/asn1crypto/
D_iri.py218 byte_string = unquote_to_bytes(match.group(0))
219 unicode_string = byte_string.decode('utf-8', 'iriutf8')
245 def _urlunquote(byte_string, remap=None, preserve=None): argument
265 if byte_string is None:
266 return byte_string
268 if byte_string == b'':
277 byte_string = byte_string.replace(char.encode('ascii'), replacement.encode('ascii'))
279 byte_string = unquote_to_bytes(byte_string)
283byte_string = byte_string.replace(char.encode('ascii'), ('%%%02x' % ord(char)).encode('ascii'))
285 output = byte_string.decode('utf-8', 'iriutf8')
Dpem.py27 def detect(byte_string): argument
39 if not isinstance(byte_string, byte_cls):
44 _type_name(byte_string)
47 return byte_string.find(b'-----BEGIN') != -1 or byte_string.find(b'---- BEGIN') != -1
D_types.py13 def bytes_to_list(byte_string): argument
14 return [ord(b) for b in byte_string]
Dkeys.py156 byte_string = b'\x04'
157 byte_string += int_to_bytes(x, width=num_bytes)
158 byte_string += int_to_bytes(y, width=num_bytes)
160 return cls(byte_string)
Dx509.py390 byte_string = self.__bytes__()
391 byte_len = len(byte_string)
395 value = inet_ntop(socket.AF_INET6, byte_string[0:16])
397 cidr_int = int_from_bytes(byte_string[16:])
399 value = inet_ntop(socket.AF_INET, byte_string[0:4])
401 cidr_int = int_from_bytes(byte_string[4:])
/aosp_15_r20/packages/modules/Bluetooth/system/gd/common/
Dbyte_array_test.cc67 void simple_from_string_test(const char* byte_string, const T (&data)[N]) { in simple_from_string_test() argument
68 auto byte_array = ByteArray<N>::FromString(byte_string); in simple_from_string_test()
77 void simple_to_string_test(const char* byte_string, const T (&data)[N]) { in simple_to_string_test() argument
80 ASSERT_STREQ(str.c_str(), byte_string); in simple_to_string_test()
84 void simple_from_legacy_string_test(const char* byte_string, const T (&data)[N]) { in simple_from_legacy_string_test() argument
85 auto byte_array = ByteArray<N>::FromLegacyConfigString(byte_string); in simple_from_legacy_string_test()
94 void simple_to_legacy_string_test(const char* byte_string, const T (&data)[N]) { in simple_to_legacy_string_test() argument
97 ASSERT_STREQ(str.c_str(), byte_string); in simple_to_legacy_string_test()
/aosp_15_r20/external/python/asn1crypto/tests/
Dtest_pem.py62 byte_string = f.read()
63 self.assertEqual(is_pem, pem.detect(byte_string))
112 byte_string = f.read()
114 type_name, headers, decoded_bytes = pem.unarmor(byte_string)
141 byte_string = f.read()
143 encoded_bytes = pem.armor(type_name, byte_string, headers=headers)
/aosp_15_r20/external/tensorflow/tensorflow/python/kernel_tests/image_ops/
H A Ddecode_bmp_op_test.py55 byte_string = bytes(bytearray(encoded_bytes))
56 img_in = constant_op.constant(byte_string, dtype=dtypes.string)
131 byte_string = bytes(bytearray(encoded_bytes))
132 img_in = constant_op.constant(byte_string, dtype=dtypes.string)
H A Ddecode_png_op_test.py39 byte_string = bytes(bytearray(encoded_bytes))
40 img_in = constant_op.constant(byte_string, dtype=dtypes.string)
/aosp_15_r20/external/cronet/third_party/rust/chromium_crates_io/vendor/proc-macro2-1.0.80/tests/
H A Dtest.rs173 assert(Literal::byte_string(b""), r#" b"" "#); in literal_byte_string()
174 assert(Literal::byte_string(b"\0"), r#" b"\0" "#); in literal_byte_string()
175 assert(Literal::byte_string(b"\t"), r#" b"\t" "#); in literal_byte_string()
176 assert(Literal::byte_string(b"\n"), r#" b"\n" "#); in literal_byte_string()
177 assert(Literal::byte_string(b"\r"), r#" b"\r" "#); in literal_byte_string()
178 assert(Literal::byte_string(b"\""), r#" b"\"" "#); in literal_byte_string()
179 assert(Literal::byte_string(b"\\"), r#" b"\\" "#); in literal_byte_string()
180 assert(Literal::byte_string(b"\x1f"), r#" b"\x1F" "#); in literal_byte_string()
181 assert(Literal::byte_string(b"'"), r#" b"'" "#); in literal_byte_string()
183 Literal::byte_string(b"a\00b\07c\08d\0e\0"), in literal_byte_string()
/aosp_15_r20/external/federated-compute/fcp/secagg/shared/
H A Dsecagg_vector.cc150 int index, int bit_width, const std::string& byte_string) { in UnpackUint64FromByteStringAt() argument
167 (byte_string[leftmost_byte_index] & mask) >> num_bits_to_skip; in UnpackUint64FromByteStringAt()
183 unpacked_element |= (byte_string[current_byte_index] & lower_bits_mask); in UnpackUint64FromByteStringAt()
193 unpacked_element |= byte_string[current_byte_index] & 0xff; in UnpackUint64FromByteStringAt()
203 unpacked_element |= (byte_string[current_byte_index] & 0xff) >> in UnpackUint64FromByteStringAt()
/aosp_15_r20/external/tensorflow/tensorflow/core/distributed_runtime/
H A Dworker_cache_logger.cc106 auto byte_string = strings::StrCat("[", bytes, "B] "); in RecordDataTransfer() local
108 byte_string = strings::Printf("[%.1fMB] ", bytes / 1048576.0); in RecordDataTransfer()
114 auto label = strings::StrCat(byte_string, rate_string, tensor_name, in RecordDataTransfer()
/aosp_15_r20/external/private-join-and-compute/private_join_and_compute/py/crypto_util/
H A Dconverters.py74 def BytesToLong(byte_string: bytes) -> int:
77 padded_byte_str = _PadZeroBytes(byte_string, 4)
/aosp_15_r20/tools/security/gdb/heap_print/
H A Dheap_print_script.py227 byte_string = gdb.execute(
229 result += byte_string.split(':')[1].strip() + " "
/aosp_15_r20/packages/modules/Bluetooth/system/tools/irk-calculator/src/
Dmain.rs232 let byte_string = vs.join(""); in _validate_address_byte() localVariable
233 match parse_hex(&byte_string.as_str()) { in _validate_address_byte()
/aosp_15_r20/external/rust/android-crates-io/crates/proc-macro2/tests/
Dtest.rs137 assert_eq!(Literal::byte_string(b"").to_string(), "b\"\""); in literal_byte_string()
139 Literal::byte_string(b"\0\t\n\r\"\\2\x10").to_string(), in literal_byte_string()
143 Literal::byte_string(b"a\00b\07c\08d\0e\0").to_string(), in literal_byte_string()
/aosp_15_r20/external/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/
H A Dtypes.pass.cpp30 static_assert((std::is_same<myconv::byte_string, std::string>::value), ""); in main()
/aosp_15_r20/external/cronet/third_party/libc++/src/test/std/localization/locales/locale.convenience/conversions/conversions.string/
H A Dtypes.pass.cpp35 static_assert((std::is_same<myconv::byte_string, std::string>::value), ""); in main()
/aosp_15_r20/prebuilts/vndk/v32/x86/include/external/libcxx/include/
Dlocale91 typedef basic_string<char, char_traits<char>, Byte_alloc> byte_string;
98 explicit wstring_convert(const byte_string& byte_err, // explicit in C++14
106 wide_string from_bytes(const byte_string& str);
109 byte_string to_bytes(Elem wchar);
110 byte_string to_bytes(const Elem* wptr);
111 byte_string to_bytes(const wide_string& wstr);
112 byte_string to_bytes(const Elem* first, const Elem* last);
3643 typedef basic_string<char, char_traits<char>, _Byte_alloc> byte_string;
3649 byte_string __byte_err_string_;
3662 _LIBCPP_EXPLICIT_AFTER_CXX11 wstring_convert(const byte_string& __byte_err,
[all …]
/aosp_15_r20/prebuilts/vndk/v32/arm64/include/external/libcxx/include/
Dlocale91 typedef basic_string<char, char_traits<char>, Byte_alloc> byte_string;
98 explicit wstring_convert(const byte_string& byte_err, // explicit in C++14
106 wide_string from_bytes(const byte_string& str);
109 byte_string to_bytes(Elem wchar);
110 byte_string to_bytes(const Elem* wptr);
111 byte_string to_bytes(const wide_string& wstr);
112 byte_string to_bytes(const Elem* first, const Elem* last);
3643 typedef basic_string<char, char_traits<char>, _Byte_alloc> byte_string;
3649 byte_string __byte_err_string_;
3662 _LIBCPP_EXPLICIT_AFTER_CXX11 wstring_convert(const byte_string& __byte_err,
[all …]
/aosp_15_r20/prebuilts/vndk/v30/x86/include/external/libcxx/include/
Dlocale91 typedef basic_string<char, char_traits<char>, Byte_alloc> byte_string;
98 explicit wstring_convert(const byte_string& byte_err, // explicit in C++14
106 wide_string from_bytes(const byte_string& str);
109 byte_string to_bytes(Elem wchar);
110 byte_string to_bytes(const Elem* wptr);
111 byte_string to_bytes(const wide_string& wstr);
112 byte_string to_bytes(const Elem* first, const Elem* last);
3643 typedef basic_string<char, char_traits<char>, _Byte_alloc> byte_string;
3649 byte_string __byte_err_string_;
3662 _LIBCPP_EXPLICIT_AFTER_CXX11 wstring_convert(const byte_string& __byte_err,
[all …]
/aosp_15_r20/prebuilts/vndk/v33/x86_64/include/external/libcxx/include/
Dlocale91 typedef basic_string<char, char_traits<char>, Byte_alloc> byte_string;
98 explicit wstring_convert(const byte_string& byte_err, // explicit in C++14
106 wide_string from_bytes(const byte_string& str);
109 byte_string to_bytes(Elem wchar);
110 byte_string to_bytes(const Elem* wptr);
111 byte_string to_bytes(const wide_string& wstr);
112 byte_string to_bytes(const Elem* first, const Elem* last);
3643 typedef basic_string<char, char_traits<char>, _Byte_alloc> byte_string;
3649 byte_string __byte_err_string_;
3662 _LIBCPP_EXPLICIT_AFTER_CXX11 wstring_convert(const byte_string& __byte_err,
[all …]

1234