Home
last modified time | relevance | path

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

12

/tools/security/fuzzing/orphans/pppd/
Deap_fuzz.proto28 required bytes data = 1;
32 required bytes data = 1;
36 required bytes data = 2;
48 required bytes data = 1;
52 required bytes data = 1;
56 required bytes data = 1;
60 required bytes data = 1;
74 required bytes data = 1;
78 required bytes data = 1;
90 required bytes data = 1;
[all …]
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/
DCentralDirectory.java224 static CentralDirectory makeFromData(@Nonnull ByteBuffer bytes, int count, @Nonnull ZFile file) in makeFromData() argument
226 Preconditions.checkNotNull(bytes, "bytes == null"); in makeFromData()
233 directory.readEntry(bytes); in makeFromData()
240 + bytes.position() in makeFromData()
281 private void readEntry(@Nonnull ByteBuffer bytes) throws IOException { in readEntry() argument
282 F_SIGNATURE.verify(bytes); in readEntry()
283 long madeBy = F_MADE_BY.read(bytes); in readEntry()
285 long versionNeededToExtract = F_VERSION_EXTRACT.read(bytes); in readEntry()
291 long gpBit = F_GP_BIT.read(bytes); in readEntry()
294 long methodCode = F_METHOD.read(bytes); in readEntry()
[all …]
DZipField.java146 void skip(@Nonnull ByteBuffer bytes) throws IOException { in skip() argument
147 if (bytes.remaining() < size) { in skip()
149 + bytes.remaining() + " remain in the buffer."); in skip()
152 bytes.position(bytes.position() + size); in skip()
163 long read(@Nonnull ByteBuffer bytes) throws IOException { in read() argument
164 if (bytes.remaining() < size) { in read()
166 + bytes.remaining() + " remain in the buffer."); in read()
169 bytes.order(ByteOrder.LITTLE_ENDIAN); in read()
173 r = LittleEndianUtils.readUnsigned2Le(bytes); in read()
175 r = LittleEndianUtils.readUnsigned4Le(bytes); in read()
[all …]
DStoredEntry.java357 public int read(byte[] bytes) throws IOException { in read() argument
358 if (bytes.length < getCentralDirectoryHeader().getUncompressedSize()) { in read()
363 return ByteStreams.read(is, bytes, 0, bytes.length); in read()
438 ByteBuffer bytes = ByteBuffer.wrap(localHeader); in readLocalHeader() local
439 F_LOCAL_SIGNATURE.verify(bytes); in readLocalHeader()
440 F_VERSION_EXTRACT.verify(bytes, compressInfo.getVersionExtract(), verifyLog); in readLocalHeader()
441 F_GP_BIT.verify(bytes, cdh.getGpBit().getValue(), verifyLog); in readLocalHeader()
442 F_METHOD.verify(bytes, compressInfo.getMethod().methodCode, verifyLog); in readLocalHeader()
445 F_LAST_MOD_TIME.skip(bytes); in readLocalHeader()
446 F_LAST_MOD_DATE.skip(bytes); in readLocalHeader()
[all …]
DEocd.java124 Eocd(@Nonnull ByteBuffer bytes) throws IOException { in Eocd() argument
129 F_SIGNATURE.verify(bytes); in Eocd()
130 F_NUMBER_OF_DISK.verify(bytes); in Eocd()
131 F_DISK_CD_START.verify(bytes); in Eocd()
132 long totalRecords1 = F_RECORDS_DISK.read(bytes); in Eocd()
133 long totalRecords2 = F_RECORDS_TOTAL.read(bytes); in Eocd()
134 long directorySize = F_CD_SIZE.read(bytes); in Eocd()
135 long directoryOffset = F_CD_OFFSET.read(bytes); in Eocd()
136 int commentSize = Ints.checkedCast(F_COMMENT_SIZE.read(bytes)); in Eocd()
152 if (bytes.remaining() < commentSize) { in Eocd()
[all …]
DEncodeUtils.java50 public static String decode(@Nonnull ByteBuffer bytes, int length, @Nonnull GPFlags flags) in decode() argument
52 if (bytes.remaining() < length) { in decode()
53 throw new IOException("Only " + bytes.remaining() + " bytes exist in the buffer, but " in decode()
58 bytes.get(stringBytes); in decode()
109 ByteBuffer bytes = charset.encode(name); in encode() local
110 byte[] result = new byte[bytes.remaining()]; in encode()
111 bytes.get(result); in encode()
/tools/apksig/src/main/java/com/android/apksig/internal/apk/v4/
DV4Signature.java49 static HashingInfo fromByteArray(byte[] bytes) throws IOException { in fromByteArray() argument
50 ByteBuffer buffer = ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN); in fromByteArray()
88 static SigningInfo fromByteArray(byte[] bytes) throws IOException { in fromByteArray() argument
89 return fromByteBuffer(ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN)); in fromByteArray()
156 public static SigningInfos fromByteArray(byte[] bytes) throws IOException { in fromByteArray() argument
157 ByteBuffer buffer = ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN); in fromByteArray()
243 static int bytesSize(byte[] bytes) { in bytesSize() argument
244 return 4/*length*/ + (bytes == null ? 0 : bytes.length); in bytesSize()
273 final byte[] bytes = new byte[size]; in readBytes()
274 readFully(stream, bytes); in readBytes()
[all …]
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/utils/
DLittleEndianUtils.java46 public static long readUnsigned4Le(@Nonnull ByteBuffer bytes) throws IOException { in readUnsigned4Le() argument
47 Preconditions.checkNotNull(bytes, "bytes == null"); in readUnsigned4Le()
49 if (bytes.remaining() < 4) { in readUnsigned4Le()
50 throw new EOFException("Not enough data: 4 bytes expected, " + bytes.remaining() in readUnsigned4Le()
54 byte b0 = bytes.get(); in readUnsigned4Le()
55 byte b1 = bytes.get(); in readUnsigned4Le()
56 byte b2 = bytes.get(); in readUnsigned4Le()
57 byte b3 = bytes.get(); in readUnsigned4Le()
72 public static int readUnsigned2Le(@Nonnull ByteBuffer bytes) throws IOException { in readUnsigned2Le() argument
73 Preconditions.checkNotNull(bytes, "bytes == null"); in readUnsigned2Le()
[all …]
/tools/test/connectivity/acts_tests/tests/google/wifi/aware/functional/
DMatchFilterTest.py34 MF_NNNNN = bytes([0x0, 0x0, 0x0, 0x0, 0x0])
35 MF_12345 = bytes([0x1, 0x1, 0x1, 0x2, 0x1, 0x3, 0x1, 0x4, 0x1, 0x5])
36 MF_12145 = bytes([0x1, 0x1, 0x1, 0x2, 0x1, 0x1, 0x1, 0x4, 0x1, 0x5])
37 MF_1N3N5 = bytes([0x1, 0x1, 0x0, 0x1, 0x3, 0x0, 0x1, 0x5])
38 MF_N23N5 = bytes([0x0, 0x1, 0x2, 0x1, 0x3, 0x0, 0x1, 0x5])
39 MF_N2N4 = bytes([0x0, 0x1, 0x2, 0x0, 0x1, 0x4])
40 MF_1N3N = bytes([0x1, 0x1, 0x0, 0x1, 0x3, 0x0])
DDiscoveryTest.py83 bytes(range(40))])
189 bytes(discovery_event["data"][
255 bytes(discovery_event["data"][
508 bytes(range(40))])
522 bytes(range(40))])
1211 bytes(event["data"][
1221 bytes(event["data"][
/tools/security/remote_provisioning/cert_validator/src/
Dbcc.rs283 let bytes = payload in from_payload() localVariable
287 Self::from_slice(bytes) in from_payload()
290 fn from_slice(bytes: &[u8]) -> Result<SubjectPublicKey> { in from_slice()
291 Ok(SubjectPublicKey(CoseKey::from_slice(bytes).map_err(cose_error)?)) in from_slice()
459 let bytes = value.as_bytes().ok_or(fmt::Error)?; in write_config_desc() localVariable
460 let config_desc = ConfigDesc::from_slice(bytes).map_err(|_| fmt::Error)?; in write_config_desc()
465 let bytes = value.as_bytes().ok_or(fmt::Error)?; in write_subject_public_key() localVariable
466 let subject_public_key = SubjectPublicKey::from_slice(bytes).map_err(|_| fmt::Error)?; in write_subject_public_key()
471 if let Some(bytes) = value.as_bytes() { in write_value()
472 write_bytes_in_hex(f, bytes) in write_value()
[all …]
/tools/metalava/src/main/java/com/android/tools/metalava/
DConvertJarsToSignatureFiles.kt159 val bytes = ByteStreams.toByteArray(`is`) in <lambda>() constant
160 if (bytes != null) { in <lambda>()
161 markDeprecated(codebase, bytes, path + ":" + entry.name) in <lambda>()
180 val bytes = file.readBytes() in <lambda>() constant
181 markDeprecated(codebase, bytes, file.path) in <lambda>()
187 private fun markDeprecated(codebase: Codebase, bytes: ByteArray, path: String) { in <lambda>()
192 reader = ClassReader(bytes) in <lambda>()
DRewriteAnnotations.kt156 val bytes = file.readBytes() in <lambda>() constant
157 val rewritten = rewriteClass(bytes, file.path) ?: return in <lambda>()
161 private fun rewriteClass(bytes: ByteArray, path: String): ByteArray? { in <lambda>()
163 val reader = ClassReader(bytes) in <lambda>()
251 val bytes = zis.readBytes() in <lambda>() constant
252 val rewritten = rewriteClass(bytes, name) in <lambda>()
256 zos.write(bytes) in <lambda>()
/tools/test/connectivity/acts/framework/tests/
Dacts_job_test.py18 from builtins import bytes
42 self._stdout = bytes(stdout,
43 'utf-8') if stdout is not None else bytes()
44 self._stderr = bytes(stderr,
45 'utf-8') if stderr is not None else bytes()
Dacts_utils_test.py462 job.Result(stdout=bytes(MOCK_IP_ADDRESSES, 'utf-8'),
464 job.Result(stdout=bytes(MOCK_IFCONFIG_OUTPUT, 'utf-8'),
473 job.Result(stdout=bytes(MOCK_IP_ADDRESSES, 'utf-8'),
475 job.Result(stdout=bytes(MOCK_IFCONFIG_OUTPUT, 'utf-8'),
484 job.Result(stdout=bytes(MOCK_IP_ADDRESSES, 'utf-8'),
486 job.Result(stdout=bytes(MOCK_IFCONFIG_OUTPUT, 'utf-8'),
496 job.Result(stdout=bytes(MOCK_IP_ADDRESSES, 'utf-8'),
498 job.Result(stdout=bytes(MOCK_IFCONFIG_OUTPUT, 'utf-8'),
/tools/apksig/src/apksigner/java/com/android/apksigner/
DPasswordRetriever.java301 private static char[] castBytesToChars(byte[] bytes) { in castBytesToChars() argument
302 if (bytes == null) { in castBytesToChars()
306 char[] chars = new char[bytes.length]; in castBytesToChars()
307 for (int i = 0; i < bytes.length; i++) { in castBytesToChars()
308 chars[i] = (char) (bytes[i] & 0xff); in castBytesToChars()
/tools/test/connectivity/acts/framework/acts/libs/proc/
Djob.py73 stdout=bytes(),
74 stderr=bytes(),
143 out = bytes()
144 err = bytes()
/tools/security/remote_provisioning/attestation_testing/java/com/google/attestationexample/
DAsn1Utils.java73 public static ASN1Encodable getAsn1EncodableFromBytes(byte[] bytes) in getAsn1EncodableFromBytes() argument
75 try (ASN1InputStream asn1InputStream = new ASN1InputStream(bytes)) { in getAsn1EncodableFromBytes()
82 public static ASN1Sequence getAsn1SequenceFromBytes(byte[] bytes) in getAsn1SequenceFromBytes() argument
84 try (ASN1InputStream asn1InputStream = new ASN1InputStream(bytes)) { in getAsn1SequenceFromBytes()
/tools/treble/hacksaw/config/
Dconfig_test.go38 var outputBuffer bytes.Buffer
43 if bytes.Compare(outputBuffer.Bytes(), expectedOutput) != 0 {
59 inputBuffer := bytes.NewBuffer(inputBytes)
/tools/apksig/src/main/java/com/android/apksig/internal/jar/
DManifestParser.java123 byte[] bytes = readAttributeBytes(); in readAttribute()
124 if (bytes == null) { in readAttribute()
126 } else if (bytes.length == 0) { in readAttribute()
129 return new String(bytes, StandardCharsets.UTF_8); in readAttribute()
/tools/test/connectivity/acts_tests/tests/google/net/
DDhcpServerTest.py616 ], opts_padding=bytes(6))
645 ], opts_padding=bytes(6))
680 ], opts_padding=bytes(6))
711 ], opts_padding=bytes(11))
789 ], opts_padding=bytes(26))
805 ], opts_padding=bytes(20))
819 opts_padding=bytes(32))
1062 return b'\x44\x85\x00\x00' + bytes([index >> 8, index & 0xff])
/tools/test/connectivity/acts_tests/acts_contrib/test_utils/wifi/aware/
Daware_test_utils.py192 obj = bytes()
195 base64.b64encode(bytes(obj, 'utf-8')).decode('utf-8'))
228 mf_list.append(bytes([i]))
230 mf_list.append(bytes([255]))
232 mf_list.append(bytes([254, 255]))
/tools/security/fuzzing/orphans/libffi/
Dfuzz_ffi.cc119 std::vector<uint8_t> bytes = dataProvider->ConsumeBytes<uint8_t>(type_size); in genArg() local
120 memcpy(ret, bytes.data(), bytes.size()); in genArg()
/tools/security/fuzzing/example_fuzzer/
DREADME.md47 INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 4096 bytes
74 Shadow bytes around the buggy address:
86 Shadow byte legend (one shadow byte represents 8 application bytes):
/tools/apksig/src/test/java/com/android/apksig/internal/util/
DX509CertificateUtilsTest.java187 private static String getHexEncodedDigestOfBytes(byte[] bytes) in getHexEncodedDigestOfBytes() argument
189 return HexEncoding.encode(MessageDigest.getInstance("SHA-256").digest(bytes)); in getHexEncodedDigestOfBytes()

12