/tools/apksig/src/main/java/com/android/apksig/internal/apk/v4/ |
D | V4Signature.java | 46 ByteBuffer buffer = ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN); in fromByteArray() local 47 final int hashAlgorithm = buffer.getInt(); in fromByteArray() 48 final byte log2BlockSize = buffer.get(); in fromByteArray() 49 byte[] salt = readBytes(buffer); in fromByteArray() 50 byte[] rawRootHash = readBytes(buffer); in fromByteArray() 57 ByteBuffer buffer = ByteBuffer.allocate(size).order(ByteOrder.LITTLE_ENDIAN); in toByteArray() local 58 buffer.putInt(this.hashAlgorithm); in toByteArray() 59 buffer.put(this.log2BlockSize); in toByteArray() 60 writeBytes(buffer, this.salt); in toByteArray() 61 writeBytes(buffer, this.rawRootHash); in toByteArray() [all …]
|
/tools/external/fat32lib/src/main/java/de/waldheinz/fs/fat/ |
D | Sector.java | 37 protected final ByteBuffer buffer; field in Sector 44 this.buffer = ByteBuffer.allocate(size); in Sector() 45 this.buffer.order(ByteOrder.LITTLE_ENDIAN); in Sector() 57 buffer.rewind(); in read() 58 buffer.limit(buffer.capacity()); in read() 59 device.read(offset, buffer); in read() 83 buffer.position(0); in write() 84 buffer.limit(buffer.capacity()); in write() 85 device.write(offset, buffer); in write() 90 return buffer.getShort(offset) & 0xffff; in get16() [all …]
|
D | Fat32BootSector.java | 194 buffer.rewind(); in writeCopy() 195 buffer.limit(buffer.capacity()); in writeCopy() 196 device.write(offset, buffer); in writeCopy()
|
/tools/trebuchet/core/common/src/main/kotlin/trebuchet/io/ |
D | DataSlice.kt | 19 data class DataSlice(var buffer: ByteArray, variable in trebuchet.io.DataSlice 28 constructor(buffer: ByteArray) : this(buffer, 0, buffer.size) 31 inline operator fun get(i: Int): Byte = buffer[startIndex + i] in get() 36 dest.set(buffer, this.startIndex + startIndex, this.startIndex + endIndex) in get() 42 fun set(buffer: ByteArray, startIndex: Int, endIndex: Int) { in set() 43 this.buffer = buffer in set() 58 if (buffer[myIndex] != other.buffer[otherIndex]) { in equals() 73 hash = 31 * hash + buffer[i].toInt() in hashCode() 80 override fun toString() = String(buffer, startIndex, length) in toString() 83 if (length - buffer.size < 50) { in toString() [all …]
|
D | StreamingReader.kt | 85 private fun addBuffer(buffer: DataSlice) { in addBuffer() 86 windows.add(Window(buffer, endIndex + 1, endIndex + buffer.length)) in addBuffer() 87 endIndex += buffer.length in addBuffer()
|
/tools/test/connectivity/acts/framework/acts/controllers/monsoon_lib/sampling/engine/ |
D | transformer.py | 68 def _transform_buffer(self, buffer): argument 134 buffer = self._transform_buffer(indexed_buffer.buffer) 135 if buffer is BufferStream.END: 137 indexed_buffer.buffer = buffer 143 def _transform_buffer(self, buffer): argument 164 buffer_or_buffers = self._transform_buffer(indexed_buffer.buffer) 182 for buffer in buffer_list: 183 new_buffer = IndexedBuffer(self._next_index, buffer) 187 def _transform_buffer(self, buffer): argument 203 buffer = self._transform_buffer(indexed_buffer.buffer) [all …]
|
D | transformers.py | 53 def _transform_buffer(self, buffer): argument 59 for sample in buffer: 68 return BufferList([buffer]) 112 def _transform_buffer(self, buffer): argument 118 for sample in buffer: 129 return BufferList([buffer]) 150 def _transform_buffer(self, buffer): argument 156 for sample in buffer: 163 return buffer 196 def _transform_buffer(self, buffer): argument [all …]
|
D | assembly_line.py | 248 self.buffer = [None] * size_or_buffer 250 self.buffer = size_or_buffer 296 def add_indexed_buffer(self, buffer): argument 298 self._buffer_queue.put(buffer, block=False) 325 def add_indexed_buffer(self, buffer): argument
|
/tools/test/connectivity/acts/framework/tests/controllers/monsoon_lib/sampling/engine/ |
D | transformers_test.py | 145 buffer = [ 154 values = downsampler._transform_buffer(buffer) 156 self.assertEqual(len(values), len(buffer) / 2) 160 ((buffer[2 * i] + buffer[2 * i + 1]) / 2).main_current) 164 buffer = [ 172 downsampler._transform_buffer(buffer) 175 self.assertIn(buffer[-2], downsampler._leftovers) 176 self.assertIn(buffer[-1], downsampler._leftovers) 185 buffer = [ 192 values = downsampler._transform_buffer(buffer) [all …]
|
/tools/apksig/src/main/java/com/android/apksig/internal/zip/ |
D | ZipUtils.java | 242 static void assertByteOrderLittleEndian(ByteBuffer buffer) { in assertByteOrderLittleEndian() argument 243 if (buffer.order() != ByteOrder.LITTLE_ENDIAN) { in assertByteOrderLittleEndian() 248 public static int getUnsignedInt16(ByteBuffer buffer, int offset) { in getUnsignedInt16() argument 249 return buffer.getShort(offset) & 0xffff; in getUnsignedInt16() 252 public static int getUnsignedInt16(ByteBuffer buffer) { in getUnsignedInt16() argument 253 return buffer.getShort() & 0xffff; in getUnsignedInt16() 296 static void setUnsignedInt16(ByteBuffer buffer, int offset, int value) { in setUnsignedInt16() argument 300 buffer.putShort(offset, (short) value); in setUnsignedInt16() 303 static void setUnsignedInt32(ByteBuffer buffer, int offset, long value) { in setUnsignedInt32() argument 307 buffer.putInt(offset, (int) value); in setUnsignedInt32() [all …]
|
/tools/security/fuzzing/system_fuzzers/libcrypto_utils/ |
D | libcrypto_utils_fuzzer.cpp | 35 uint8_t buffer[ANDROID_PUBKEY_ENCODED_SIZE]; in LLVMFuzzerTestOneInput() local 37 memcpy(buffer, &modulus_size_words, sizeof(uint32_t)); in LLVMFuzzerTestOneInput() 40 memcpy(buffer+sizeof(uint32_t), &n0inv, sizeof(uint32_t)); in LLVMFuzzerTestOneInput() 44 memcpy(buffer+sizeof(uint32_t)*2, modulus, in LLVMFuzzerTestOneInput() 49 memcpy(buffer+sizeof(uint32_t)*2+ANDROID_PUBKEY_MODULUS_SIZE, rr, in LLVMFuzzerTestOneInput() 53 buffer[ANDROID_PUBKEY_ENCODED_SIZE-1] = (uint8_t)(flip == 0 ? 3 : 65537); in LLVMFuzzerTestOneInput() 56 android_pubkey_decode(buffer, sizeof(uint8_t)*ANDROID_PUBKEY_ENCODED_SIZE, &new_key); in LLVMFuzzerTestOneInput() 61 assert(0 == memcmp(buffer, key_data, sizeof(buffer))); in LLVMFuzzerTestOneInput()
|
/tools/test/connectivity/acts/framework/acts/controllers/monsoon_lib/sampling/hvpm/ |
D | transformers.py | 122 def _transform_buffer(self, buffer): argument 133 for index in range(len(buffer)): 148 buffer[index] = time_data + data.tobytes() 150 return buffer 199 def _transform_buffer(self, buffer): argument 202 for i in range(len(buffer)): 203 buffer[i] = Packet(buffer[i]) 205 if buffer and not self.start_time and i == 0: 206 self.start_time = buffer[0].time_of_read 208 if (buffer[i].time_of_read - self.start_time > [all …]
|
/tools/apksig/src/test/java/com/android/apksig/internal/util/ |
D | ChainedDataSourceTest.java | 72 ByteBuffer buffer = mChain.getByteBuffer(begin, size); in getByteBufferFromAllPossibleRanges() local 75 buffer); in getByteBufferFromAllPossibleRanges() 90 ByteBuffer buffer = ByteBuffer.allocate(size); in copyTo() local 91 mChain.copyTo(begin, size, buffer); in copyTo() 92 assertEquals(size, buffer.position()); in copyTo() 94 buffer.rewind(); in copyTo() 97 buffer); in copyTo() 107 ByteBuffer buffer = mChain.slice(begin, size).getByteBuffer(0, size); in slice() local 111 buffer); in slice() 116 private void assertByteBufferEquals(ByteBuffer buffer, ByteBuffer buffer2) { in assertByteBufferEquals() argument [all …]
|
/tools/test/connectivity/acts/framework/acts/controllers/monsoon_lib/sampling/lvpm_stock/ |
D | stock_transformers.py | 85 def _transform_buffer(self, buffer): argument 91 for index in range(len(buffer)): 99 buffer[index] = time_data + data 101 return buffer 154 def _transform_buffer(self, buffer): argument 162 def _transform_buffer(self, buffer): argument 169 for i, packet in enumerate(buffer): 182 buffer[i] = None 185 buffer[i] = Packet(packet, time_of_read, time_since_last_read) 187 return buffer [all …]
|
/tools/trebuchet/core/common/src/main/kotlin/trebuchet/extractors/ |
D | ZlibExtractor.kt | 28 private fun findStart(buffer: GenericByteBuffer): Long { in findStart() 29 var start = buffer.indexOf(TRACE, 100) in findStart() 35 while (start < buffer.length && in findStart() 36 (buffer[start] == '\n'.toByte() || buffer[start] == '\r'.toByte())) { in findStart() 56 inflater.setInput(nextBuffer.buffer, nextBuffer.startIndex, nextBuffer.length) in <lambda>() 96 override fun extractorFor(buffer: GenericByteBuffer, feedback: ImportFeedback): Extractor? { in extractorFor() 97 val start = findStart(buffer) in extractorFor() 98 val toRead = minOf((buffer.length - start).toInt(), SIZE_TO_CHECK) in extractorFor() 107 val tmpBuffer = ByteArray(toRead) { buffer[start + it] } in extractorFor()
|
/tools/external/fat32lib/src/main/java/de/waldheinz/fs/util/ |
D | RamDisk.java | 58 final byte[] buffer = new byte[4096]; in readGzipped() 60 int read = zis.read(buffer); in readGzipped() 65 bos.write(buffer, 0, read); in readGzipped() 66 read = zis.read(buffer); in readGzipped() 76 private RamDisk(ByteBuffer buffer, int sectorSize) { in RamDisk() argument 77 this.size = buffer.limit(); in RamDisk() 79 this.data = buffer; in RamDisk()
|
/tools/apksig/src/main/java/com/android/apksig/internal/util/ |
D | ByteBufferDataSource.java | 36 public ByteBufferDataSource(ByteBuffer buffer) { in ByteBufferDataSource() argument 37 this(buffer, true); in ByteBufferDataSource() 44 private ByteBufferDataSource(ByteBuffer buffer, boolean sliceRequired) { in ByteBufferDataSource() argument 45 mBuffer = (sliceRequired) ? buffer.slice() : buffer; in ByteBufferDataSource() 46 mSize = buffer.remaining(); in ByteBufferDataSource()
|
D | ChainedDataSource.java | 86 ByteBuffer buffer = ByteBuffer.allocate(size); in getByteBuffer() local 87 for (; i < mSources.length && buffer.hasRemaining(); i++) { in getByteBuffer() 88 long sizeToCopy = Math.min(mSources[i].size() - offset, buffer.remaining()); in getByteBuffer() 89 mSources[i].copyTo(offset, Math.toIntExact(sizeToCopy), buffer); in getByteBuffer() 92 buffer.rewind(); in getByteBuffer() 93 return buffer; in getByteBuffer()
|
D | VerityTreeBuilder.java | 245 final ByteBuffer buffer = ByteBuffer.allocate(bufferSizeChunks * CHUNK_SIZE); in digestDataByChunks() local 246 dataSource.copyTo(readOffset, readSize, buffer); in digestDataByChunks() 247 buffer.rewind(); in digestDataByChunks() 252 for (int offset = 0, finish = buffer.capacity(), chunkIndex = readChunkIndex; in digestDataByChunks() 254 ByteBuffer chunk = slice(buffer, offset, offset + CHUNK_SIZE); in digestDataByChunks() 295 private static ByteBuffer slice(ByteBuffer buffer, int begin, int end) { in slice() argument 296 ByteBuffer b = buffer.duplicate(); in slice()
|
/tools/test/graphicsbenchmark/functional_tests/native/ |
D | mprotect_test.cpp | 31 char *buffer; variable 147 … vkMapMemory(device, testBufferMemory, bufferOffset, pagesInBuffer * pagesize, 0, (void**)&buffer); in TEST() 149 ASSERT_NE(buffer, nullptr) << "vkMapMemory() returned a null buffer."; in TEST() 153 …ASSERT_EQ(mprotect(buffer - bufferOffset, pagesInBuffer * pagesize + 1, PROT_READ), 0) << "mprotec… in TEST() 155 for (char *p = buffer; p != (buffer + pagesInBuffer * pagesize); p++) { in TEST()
|
/tools/trebuchet/core/common/src/main/kotlin/trebuchet/extras/ |
D | StreamAdapter.kt | 37 val buffer = ByteArray(2 * 1024 * 1024) in next() constant 38 val read = inputStream.read(buffer) in next() 45 return DataSlice(buffer, 0, read) in next()
|
/tools/apksig/src/main/java/com/android/apksig/util/ |
D | DataSources.java | 36 public static DataSource asDataSource(ByteBuffer buffer) { in asDataSource() argument 37 if (buffer == null) { in asDataSource() 40 return new ByteBufferDataSource(buffer); in asDataSource()
|
/tools/trebuchet/core/common/src/main/kotlin/trebuchet/importers/ftrace/ |
D | FtraceImporter.kt | 65 override fun importerFor(buffer: GenericByteBuffer, feedback: ImportFeedback): Importer? { in <lambda>() 66 if (buffer.contains("# tracer: nop\n", 1000) in <lambda>() 67 || buffer.contains(" trace-cmd", 1000)) { in <lambda>()
|
/tools/trebuchet/trebuchet/viewer/src/main/kotlin/traceviewer/ui/ |
D | TraceViewerWindow.kt | 74 val buffer = ByteArray(2 * 1024 * 1024) in <lambda>() constant 75 val read = stream.read(buffer) in <lambda>() 77 return buffer.asSlice(read) in <lambda>()
|
/tools/trebuchet/core/common/src/main/kotlin/trebuchet/importers/ |
D | ImporterRegistry.kt | 27 fun importerFor(buffer: GenericByteBuffer, feedback: ImportFeedback): Importer? { in importerFor() 29 val importer = it.importerFor(buffer, feedback) in importerFor()
|