/system/core/adb/ |
D | transport_usb.cpp | 64 D("UsbReadPayload(%d)", p->msg.data_length); in UsbReadPayload() 66 if (p->msg.data_length > MAX_PAYLOAD) { in UsbReadPayload() 76 size_t len = p->msg.data_length; in UsbReadPayload() 84 if (rc != static_cast<int>(p->msg.data_length)) { in UsbReadPayload() 91 p->payload.resize(p->msg.data_length); in UsbReadPayload() 106 if (p->msg.data_length) { in remote_read() 112 if (static_cast<uint32_t>(n) != p->msg.data_length) { in remote_read() 114 p->msg.data_length, n); in remote_read() 131 if (p->msg.data_length) { in remote_read() 132 if (p->msg.data_length > MAX_PAYLOAD) { in remote_read() [all …]
|
D | shell_service_protocol_test.cpp | 91 const void* data, size_t data_length) { in PacketEquals() argument 94 protocol->data_length() == data_length && in PacketEquals() 95 !memcmp(data, protocol->data(), data_length)); in PacketEquals()
|
/system/update_engine/scripts/update_payload/ |
D | applier.py | 147 data_length = len(data) 149 if not data_length: 151 write_length = min(data_length, ex.num_blocks * block_size) 160 data_length -= write_length 162 if data_length: 166 def _ExtentsToBspatchArg(extents, block_size, base_name, data_length=-1): argument 186 if data_length < 0: 187 data_length = sys.maxint 189 if not data_length: 195 if data_length < num_bytes: [all …]
|
D | test_utils.py | 195 data_length=None, src_extents=None, src_length=None, argument 205 _SetMsgField(op, 'data_length', data_length) 274 data_length = len(data_blob) 276 self.curr_offset += data_length 278 return data_length, data_offset 299 data_offset = data_length = data_sha256_hash = None 303 data_length, data_offset = self.AddData(data_blob) 306 data_length=data_length, src_extents=src_extents, 353 data_offset=self.curr_offset, data_length=sigs_len,
|
D | checker_unittest.py | 571 data_length = 10000 581 op, data_length, (data_length + block_size - 1) / block_size, 588 op, data_length, (data_length + block_size - 1) / block_size, 'foo') 594 op, None, (data_length + block_size - 1) / block_size, 'foo') 600 op, data_length, (data_length + block_size - 1) / block_size + 1, 'foo') 606 data_length = block_size * 3 616 op, data_length, (data_length + block_size - 1) / block_size + 5, 623 op, data_length, (data_length + block_size - 1) / block_size + 5, 'foo') 629 op, None, (data_length + block_size - 1) / block_size, 'foo') 635 op, data_length, (data_length + block_size - 1) / block_size, 'foo') [all …]
|
D | checker.py | 777 def _CheckReplaceOperation(self, op, data_length, total_dst_blocks, op_name): argument 794 if data_length is None: 798 PayloadChecker._CheckBlocksFitLength(data_length, total_dst_blocks, 803 if data_length >= total_dst_blocks * self.block_size: 807 (op_name, data_length, total_dst_blocks, self.block_size)) 905 if op.data_length: 910 def _CheckAnyDiffOperation(self, op, data_length, total_dst_blocks, op_name): argument 924 if data_length is None: 928 if data_length >= total_dst_blocks * self.block_size: 932 (op_name, data_length, total_dst_blocks, self.block_size, [all …]
|
/system/keymaster/legacy_support/ |
D | keymaster_passthrough_operation.cpp | 38 while (in.data_length != 0) { in Finish() 43 accumulated_output_size += out.data_length; in Finish() 62 if (consumed > in.data_length) return KM_ERROR_UNKNOWN_ERROR; in Finish() 63 in.data_length -= consumed; in Finish() 72 accumulated_output_size += out.data_length; in Finish() 83 output->write(outBlob.data, outBlob.data_length); in Finish() 105 if (output) output->Reinitialize(out.data, out.data_length); in Finish()
|
/system/core/trusty/keymaster/legacy/ |
D | trusty_keymaster_device.cpp | 125 if (client_id && client_id->data_length > 0) { in AddClientAndAppData() 128 if (app_data && app_data->data_length > 0) { in AddClientAndAppData() 162 keymaster_error_t TrustyKeymasterDevice::add_rng_entropy(const uint8_t* data, size_t data_length) { in add_rng_entropy() argument 170 request.random_data.Reinitialize(data, data_length); in add_rng_entropy() 267 request.SetKeyMaterial(key_data->data, key_data->data_length); in import_key() 308 export_data->data_length = 0; in export_key() 321 export_data->data_length = response.key_data_length; in export_key() 354 if (attestation_challenge.data_length > kMaximumAttestationChallengeLength) { in attest_key() 356 attestation_challenge.data_length, kMaximumAttestationChallengeLength); in attest_key() 381 cert_chain->entries[i].data = DuplicateBuffer(entry.data, entry.data_length); in attest_key() [all …]
|
D | trusty_keymaster_main.cpp | 164 if (input_consumed != input->data_length) { in do_operation() 259 d2i_PUBKEY(NULL, &tmp, exported_key.data_length)); in test_rsa() 271 if (EVP_PKEY_verify(ctx.get(), signature.data, signature.data_length, message.get(), in test_rsa() 363 d2i_PUBKEY(NULL, &tmp, exported_key.data_length)); in test_ecdsa() 374 if (EVP_PKEY_verify(ctx.get(), signature.data, signature.data_length, message.get(), in test_ecdsa()
|
/system/keymaster/km_openssl/ |
D | block_cipher_operation.cpp | 263 if (block_mode_ != KM_MODE_GCM && iv_blob.data_length != block_size_bytes()) { in GetIv() 265 iv_blob.data_length); in GetIv() 269 if (block_mode_ == KM_MODE_GCM && iv_blob.data_length != GCM_NONCE_SIZE) { in GetIv() 271 iv_blob.data_length); in GetIv() 275 iv_ = KeymasterBlob(iv_blob.data, iv_blob.data_length); in GetIv() 306 size_t blocks_to_process = aad.data_length / block_size; in HandleAad() 310 aad.data_length -= blocks_to_process * block_size; in HandleAad() 313 assert(aad.data_length == 0); in HandleAad() 352 size_t to_buffer = min(block_size_bytes() - aad_block_buf_len_, aad->data_length); in FillBufferedAadBlock() 355 aad->data_length -= to_buffer; in FillBufferedAadBlock() [all …]
|
D | soft_keymaster_enforcement.cpp | 110 if (!HMAC_Update(ctx.get(), chunk.data, chunk.data_length)) { in hmacSha256() 119 if (digest_len != output->data_length) return KM_ERROR_UNKNOWN_ERROR; in hmacSha256() 135 if (!a.data_length && !b.data_length) return true; in operator ==() 137 return (a.data_length == b.data_length && !memcmp(a.data, b.data, a.data_length)); in operator ==()
|
D | ckdf.cpp | 84 if (!CMAC_Update(ctx.get(), label.data, label.data_length)) { in DEFINE_OPENSSL_OBJECT_POINTER() 95 context_chunks[chunk].data_length)) { in DEFINE_OPENSSL_OBJECT_POINTER()
|
/system/extras/verity/ |
D | build_verity_tree_test.cpp | 125 size_t data_length = in TEST_F() local 127 ASSERT_TRUE(builder->Update(data.data() + offset, data_length)); in TEST_F() 128 offset += data_length; in TEST_F() 148 size_t data_length = std::min<size_t>(rand() % 40960, data.size() - offset); in TEST_F() local 149 ASSERT_TRUE(builder->Update(data.data() + offset, data_length)); in TEST_F() 150 offset += data_length; in TEST_F()
|
/system/core/libappfuse/ |
D | FuseBuffer.cc | 190 uint32_t data_length, uint32_t opcode, uint64_t unique) { in Reset() argument 191 memset(this, 0, sizeof(fuse_in_header) + data_length); in Reset() 192 header.len = sizeof(fuse_in_header) + data_length; in Reset() 198 void FuseResponseBase<N>::ResetHeader(uint32_t data_length, int32_t error, uint64_t unique) { in ResetHeader() argument 200 header.len = sizeof(fuse_out_header) + data_length; in ResetHeader() 206 void FuseResponseBase<N>::Reset(uint32_t data_length, int32_t error, uint64_t unique) { in Reset() argument 207 memset(this, 0, sizeof(fuse_out_header) + data_length); in Reset() 208 ResetHeader(data_length, error, unique); in Reset()
|
/system/bt/hci/test/ |
D | packet_fragmenter_test.cc | 64 uint16_t data_length = strlen(data); in manufacture_packet_for_fragmentation() local 65 uint16_t size = data_length; in manufacture_packet_for_fragmentation() 79 UINT16_TO_STREAM(packet_data, data_length); in manufacture_packet_for_fragmentation() 82 memcpy(packet_data, data, data_length); in manufacture_packet_for_fragmentation() 133 uint16_t data_length = strlen(data); in manufacture_packet_and_then_reassemble() local 136 uint16_t total_length = data_length + 2; // 2 for l2cap length; in manufacture_packet_and_then_reassemble() 138 uint16_t l2cap_length = data_length - 2; // l2cap length field, 2 for the in manufacture_packet_and_then_reassemble() 168 BT_HDR* packet = (BT_HDR*)osi_malloc(data_length + sizeof(BT_HDR)); in manufacture_packet_and_then_reassemble() 169 packet->len = data_length; in manufacture_packet_and_then_reassemble() 173 memcpy(packet->data, data, data_length); in manufacture_packet_and_then_reassemble()
|
/system/keymaster/contexts/ |
D | soft_keymaster_device.cpp | 633 const uint8_t* data, size_t data_length) { in add_rng_entropy() argument 639 return km1_dev->add_rng_entropy(km1_dev, data, data_length); in add_rng_entropy() 642 request.random_data.Reinitialize(data, data_length); in add_rng_entropy() 652 const uint8_t* data, size_t data_length) { in add_rng_entropy() argument 660 return add_rng_entropy(&sk_dev->km1_device_, data, data_length); in add_rng_entropy() 959 request.SetKeyMaterial(key_data->data, key_data->data_length); in import_key() 1029 export_data->data_length = 0; in export_key() 1041 export_data->data_length = response.key_data_length; in export_key() 1042 uint8_t* tmp = reinterpret_cast<uint8_t*>(malloc(export_data->data_length)); in export_key() 1045 memcpy(tmp, response.key_data, export_data->data_length); in export_key() [all …]
|
/system/core/libappfuse/include/libappfuse/ |
D | FuseBuffer.h | 70 void Reset(uint32_t data_length, uint32_t opcode, uint64_t unique); 92 void Reset(uint32_t data_length, int32_t error, uint64_t unique); 93 void ResetHeader(uint32_t data_length, int32_t error, uint64_t unique);
|
/system/update_engine/payload_generator/ |
D | payload_file_unittest.cc | 78 EXPECT_EQ(3U, part0_aops[0].op.data_length()); in TEST_F() 80 EXPECT_EQ(1U, part0_aops[1].op.data_length()); in TEST_F() 84 EXPECT_EQ(6U, part1_aops[0].op.data_length()); in TEST_F()
|
D | ab_generator_unittest.cc | 150 EXPECT_EQ(first_expected_blob.size(), first_op.data_length()); in TestSplitReplaceOrReplaceBzOperation() 152 brillo::Blob first_data_blob(first_op.data_length()); in TestSplitReplaceOrReplaceBzOperation() 156 first_op.data_length(), in TestSplitReplaceOrReplaceBzOperation() 159 ASSERT_EQ(bytes_read, static_cast<ssize_t>(first_op.data_length())); in TestSplitReplaceOrReplaceBzOperation() 180 EXPECT_EQ(second_expected_blob.size(), second_op.data_length()); in TestSplitReplaceOrReplaceBzOperation() 182 brillo::Blob second_data_blob(second_op.data_length()); in TestSplitReplaceOrReplaceBzOperation() 185 second_op.data_length(), in TestSplitReplaceOrReplaceBzOperation() 188 ASSERT_EQ(bytes_read, static_cast<ssize_t>(second_op.data_length())); in TestSplitReplaceOrReplaceBzOperation() 192 EXPECT_EQ(first_op.data_offset() + first_op.data_length(), in TestSplitReplaceOrReplaceBzOperation() 194 EXPECT_EQ(second_op.data_offset() + second_op.data_length(), in TestSplitReplaceOrReplaceBzOperation() [all …]
|
D | annotated_operation.cc | 58 os << InstallOperationTypeName(aop.op.type()) << " " << aop.op.data_length(); in operator <<() 59 if (aop.op.data_length() > 0) in operator <<()
|
/system/keymaster/tests/ |
D | attestation_record_test.cpp | 39 unique_id->Reinitialize(application_id.data, application_id.data_length); in GenerateUniqueId() 46 verified_boot_key->data_length = sizeof(vboot_key_); in GetVerifiedBootParams() 54 EXPECT_EQ(sizeof(vboot_key_), verified_boot_key.data_length); in VerifyRootOfTrust() 55 if (sizeof(vboot_key_) == verified_boot_key.data_length) { in VerifyRootOfTrust()
|
/system/keymaster/android_keymaster/ |
D | authorization_set.cpp | 222 void* tmp = malloc(src.blob.data_length); in CopyToParamSet() 223 memcpy(tmp, src.blob.data, src.blob.data_length); in CopyToParamSet() 295 if (indirect_data_capacity_ - indirect_data_size_ < elem.blob.data_length) in push_back() 296 if (!reserve_indirect(2 * (indirect_data_capacity_ + elem.blob.data_length))) in push_back() 299 memcpy(indirect_data_ + indirect_data_size_, elem.blob.data, elem.blob.data_length); in push_back() 301 indirect_data_size_ += elem.blob.data_length; in push_back() 359 buf = append_uint32_to_buf(buf, end, param.blob.data_length); in serialize() 402 if (!copy_uint32_from_buf(buf_ptr, end, ¶m->blob.data_length) || in deserialize() 405 if (param->blob.data_length + offset < param->blob.data_length || // Overflow check in deserialize() 407 static_cast<ptrdiff_t>(offset + param->blob.data_length) > indirect_end - indirect_base) in deserialize() [all …]
|
/system/bt/stack/btm/ |
D | ble_advertiser_hci_interface.cc | 162 uint8_t fragment_preference, uint8_t data_length, in SetAdvertisingData() argument 168 if (data_length > BTM_BLE_AD_DATA_LEN) { in SetAdvertisingData() 171 << ": data_length=" << static_cast<int>(data_length) in SetAdvertisingData() 173 data_length = BTM_BLE_AD_DATA_LEN; in SetAdvertisingData() 178 UINT8_TO_STREAM(pp, data_length); in SetAdvertisingData() 179 ARRAY_TO_STREAM(pp, data, data_length); in SetAdvertisingData() 388 uint8_t fragment_preference, uint8_t data_length, in SetAdvertisingData() argument 394 if (data_length > HCIC_PARAM_SIZE_BLE_WRITE_ADV_DATA) { in SetAdvertisingData() 397 << ": data_length=" << static_cast<int>(data_length) in SetAdvertisingData() 400 data_length = HCIC_PARAM_SIZE_BLE_WRITE_ADV_DATA; in SetAdvertisingData() [all …]
|
/system/core/adb/client/ |
D | file_sync_client.cpp | 380 const char* data, size_t data_length) { in SendSmallFile() argument 389 sizeof(SyncRequest) + data_length + in SendSmallFile() 402 req_data->path_length = data_length; in SendSmallFile() 404 memcpy(p, data, data_length); in SendSmallFile() 405 p += data_length; in SendSmallFile() 416 RecordBytesTransferred(data_length); in SendSmallFile() 417 ReportProgress(rpath, data_length, data_length); in SendSmallFile() 590 bool WriteOrDie(const char* from, const char* to, const void* data, size_t data_length) { in WriteOrDie() argument 591 if (!WriteFdExactly(fd, data, data_length)) { in WriteOrDie() 604 Error("%zu-byte write failed: %s", data_length, strerror(errno)); in WriteOrDie() [all …]
|
/system/keymaster/ng/include/ |
D | authorization_set.h | 230 size_t data_length) { in Authorization() argument 232 new_blob.setToExternal(const_cast<uint8_t*>(data), data_length); in Authorization() 239 size_t data_length) { in Authorization() argument 240 return Authorization(ttag, reinterpret_cast<const uint8_t*>(data), data_length); in Authorization()
|