Home
last modified time | relevance | path

Searched refs:data_length (Results 1 – 25 of 51) sorted by relevance

123

/system/core/adb/
Dtransport_usb.cpp40 if(p->msg.data_length) { in remote_read()
41 if(usb_read(t->usb, p->data, p->msg.data_length)){ in remote_read()
57 unsigned size = p->msg.data_length; in remote_write()
63 if(p->msg.data_length == 0) return 0; in remote_write()
Dadb_auth.cpp49 p->msg.data_length = ret; in send_auth_request()
68 p->msg.data_length = ret; in send_auth_response()
87 p->msg.data_length = ret; in send_auth_publickey()
Dshell_service_protocol_test.cpp91 const void* data, size_t data_length) { in PacketEquals() argument
93 protocol->data_length() == data_length && in PacketEquals()
94 !memcmp(data, protocol->data(), data_length)); in PacketEquals()
Dfile_sync_client.cpp168 const char* data, size_t data_length) { in SendSmallFile() argument
177 sizeof(SyncRequest) + data_length + in SendSmallFile()
190 req_data->path_length = data_length; in SendSmallFile()
192 memcpy(p, data, data_length); in SendSmallFile()
193 p += data_length; in SendSmallFile()
202 total_bytes_ += data_length; in SendSmallFile()
203 ReportProgress(rpath, data_length, data_length); in SendSmallFile()
405 bool WriteOrDie(const char* from, const char* to, const void* data, size_t data_length) { in WriteOrDie() argument
406 if (!WriteFdExactly(fd, data, data_length)) { in WriteOrDie()
419 Error("%zu-byte write failed: %s", data_length, strerror(errno)); in WriteOrDie()
[all …]
Dadb.cpp140 label, tag, p->msg.arg0, p->msg.arg1, p->msg.data_length); in print_packet()
141 count = p->msg.data_length; in print_packet()
223 cp->msg.data_length = connection_str.length(); in send_connect()
302 p->msg.data_length); in handle_new_connection()
350 send_auth_response(p->data, p->msg.data_length, t); in handle_packet()
356 if (adb_auth_verify(t->token, p->data, p->msg.data_length)) { in handle_packet()
365 adb_auth_confirm_key(p->data, p->msg.data_length, t); in handle_packet()
372 name[p->msg.data_length > 0 ? p->msg.data_length - 1 : 0] = 0; in handle_packet()
436 p->len = p->msg.data_length; in handle_packet()
Dshell_service_test.cpp123 stdout->append(protocol->data(), protocol->data_length()); in ReadShellProtocol()
126 stderr->append(protocol->data(), protocol->data_length()); in ReadShellProtocol()
130 EXPECT_EQ(1u, protocol->data_length()); in ReadShellProtocol()
Dshell_service.h95 size_t data_length() const { return data_length_; } in data_length() function
/system/bt/hci/test/
Dpacket_fragmenter_test.cpp67 uint16_t data_length = strlen(data); in manufacture_packet_for_fragmentation() local
68 uint16_t size = data_length; in manufacture_packet_for_fragmentation()
82 UINT16_TO_STREAM(packet_data, data_length); in manufacture_packet_for_fragmentation()
85 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 pretend channel id borro… in manufacture_packet_and_then_reassemble()
164 BT_HDR *packet = (BT_HDR *)osi_malloc(data_length + sizeof(BT_HDR)); in manufacture_packet_and_then_reassemble()
165 packet->len = data_length; in manufacture_packet_and_then_reassemble()
169 memcpy(packet->data, data, data_length); in manufacture_packet_and_then_reassemble()
Dhci_layer_test.cpp90 uint16_t data_length = strlen(data); in manufacture_packet() local
91 uint16_t size = data_length; in manufacture_packet()
110 UINT16_TO_STREAM(packet_data, data_length); in manufacture_packet()
113 for (int i = 0; i < data_length; i++) { in manufacture_packet()
119 UINT8_TO_STREAM(packet_data, data_length - 3); in manufacture_packet()
122 UINT8_TO_STREAM(packet_data, data_length - 2); in manufacture_packet()
128 …t(uint16_t event, int max_acl_data_size, const uint8_t *data, uint16_t data_length, const char *ex… in expect_packet() argument
144 int packet_data_length = data_length - HCI_ACL_PREAMBLE_SIZE; in expect_packet()
162 EXPECT_EQ(data_length - 3, data[i]); in expect_packet()
/system/keymaster/
Daes_operation.cpp353 if (block_mode_ != KM_MODE_GCM && iv_blob.data_length != AES_BLOCK_SIZE) { in GetIv()
355 iv_blob.data_length); in GetIv()
358 if (block_mode_ == KM_MODE_GCM && iv_blob.data_length != GCM_NONCE_SIZE) { in GetIv()
360 iv_blob.data_length); in GetIv()
363 iv_.reset(dup_array(iv_blob.data, iv_blob.data_length)); in GetIv()
366 iv_length_ = iv_blob.data_length; in GetIv()
395 size_t blocks_to_process = aad.data_length / AES_BLOCK_SIZE; in HandleAad()
399 aad.data_length -= blocks_to_process * AES_BLOCK_SIZE; in HandleAad()
402 assert(aad.data_length == 0); in HandleAad()
440 size_t to_buffer = min(AES_BLOCK_SIZE - aad_block_buf_length_, aad->data_length); in FillBufferedAadBlock()
[all …]
Dauthorization_set.cpp222 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()
397 if (!copy_uint32_from_buf(buf_ptr, end, &param->blob.data_length) || in deserialize()
400 if (param->blob.data_length + offset < param->blob.data_length || // Overflow check in deserialize()
402 static_cast<ptrdiff_t>(offset + param->blob.data_length) > indirect_end - indirect_base) in deserialize()
[all …]
Dsoft_keymaster_device.cpp625 const uint8_t* data, size_t data_length) { in add_rng_entropy() argument
631 return km1_dev->add_rng_entropy(km1_dev, data, data_length); in add_rng_entropy()
634 request.random_data.Reinitialize(data, data_length); in add_rng_entropy()
644 const uint8_t* data, size_t data_length) { in add_rng_entropy() argument
652 return add_rng_entropy(&sk_dev->km1_device_, data, data_length); in add_rng_entropy()
937 request.SetKeyMaterial(key_data->data, key_data->data_length); in import_key()
1007 export_data->data_length = 0; in export_key()
1019 export_data->data_length = response.key_data_length; in export_key()
1020 uint8_t* tmp = reinterpret_cast<uint8_t*>(malloc(export_data->data_length)); in export_key()
1023 memcpy(tmp, response.key_data, export_data->data_length); in export_key()
[all …]
Dandroid_keymaster_test_utils.cpp72 for (size_t i = 0; i < param.blob.data_length; ++i) in operator <<()
80 for (size_t i = 0; i < param.blob.data_length; ++i) in operator <<()
112 return a.blob.data_length == b.blob.data_length && in operator ==()
113 (memcmp(a.blob.data, b.blob.data, a.blob.data_length) == 0); in operator ==()
269 output->append(reinterpret_cast<const char*>(out_tmp.data), out_tmp.data_length); in UpdateOperation()
285 output->append(reinterpret_cast<const char*>(out_tmp.data), out_tmp.data_length); in UpdateOperation()
319 output->append(reinterpret_cast<const char*>(out_tmp.data), out_tmp.data_length); in FinishOperation()
480 *generated_nonce = make_string(nonce_blob.data, nonce_blob.data_length); in EncryptMessage()
511 *generated_nonce = make_string(nonce_blob.data, nonce_blob.data_length); in EncryptMessage()
530 *generated_nonce = make_string(nonce_blob.data, nonce_blob.data_length); in EncryptMessage()
[all …]
Dopenssl_utils.cpp66 blob->data_length = BN_num_bytes(bn); in convert_bn_to_blob()
67 blob->data = new uint8_t[blob->data_length]; in convert_bn_to_blob()
Dsoft_keymaster_context.cpp822 chain->entries[entry].data_length = array_length(kRsaAttestCert); in AttestationChain()
827 chain->entries[entry].data_length = array_length(kRsaAttestRootCert); in AttestationChain()
835 chain->entries[entry].data_length = array_length(kEcAttestCert); in AttestationChain()
840 chain->entries[entry].data_length = array_length(kEcAttestRootCert); in AttestationChain()
990 hidden->push_back(TAG_APPLICATION_ID, entry.data, entry.data_length); in BuildHiddenAuthorizations()
992 hidden->push_back(TAG_APPLICATION_DATA, entry.data, entry.data_length); in BuildHiddenAuthorizations()
Dandroid_keymaster_messages.cpp495 result += certificate_chain.entries[i].data_length; in NonErrorSerializedSize()
504 certificate_chain.entries[i].data_length); in NonErrorSerialize()
516 size_t data_length; in NonErrorDeserialize() local
517 if (!copy_size_and_data_from_buf(buf_ptr, end, &data_length, &data)) in NonErrorDeserialize()
520 certificate_chain.entries[i].data_length = data_length; in NonErrorDeserialize()
Dandroid_keymaster_test_utils.h100 set[pos].blob.data_length) == val; in contains()
108 set[pos].blob.data_length) == val; in contains()
318 .data_length = 6};
320 Authorization(TAG_APPLICATION_ID, client_id_.data, client_id_.data_length)};
437 const uint8_t* data, const size_t data_length, in counting_sign_data()
442 data, data_length, signed_data, signed_data_length); in counting_sign_data()
Dkeymaster1_engine.cpp308 *out_len = std::min(output.data_length, max_out); in rsa_sign_raw()
333 *out_len = std::min(output.data_length, max_out); in rsa_decrypt()
357 *sig_len = std::min(output.data_length, ECDSA_size(ec_key)); in ecdsa_sign()
383 return d2i_PUBKEY(nullptr /* allocate new struct */, &p, export_data.data_length); in GetKeymaster1PublicKey()
Dasymmetric_key.cpp215 blob->data_length = len; in get_certificate_blob()
253 chain->entries[1].data_length = 0; in copy_attestation_chain()
352 X509_Ptr signing_cert(d2i_X509(nullptr, &p, cert_chain->entries[1].data_length)); in GenerateAttestation()
/system/update_engine/payload_generator/
Dpayload_file_unittest.cc85 EXPECT_EQ(3U, part0_aops[0].op.data_length()); in TEST_F()
87 EXPECT_EQ(1U, part0_aops[1].op.data_length()); in TEST_F()
91 EXPECT_EQ(6U, part1_aops[0].op.data_length()); in TEST_F()
Dab_generator_unittest.cc153 EXPECT_EQ(first_expected_blob.size(), first_op.data_length()); in TestSplitReplaceOrReplaceBzOperation()
155 brillo::Blob first_data_blob(first_op.data_length()); in TestSplitReplaceOrReplaceBzOperation()
159 first_op.data_length(), in TestSplitReplaceOrReplaceBzOperation()
162 ASSERT_EQ(bytes_read, static_cast<ssize_t>(first_op.data_length())); in TestSplitReplaceOrReplaceBzOperation()
182 EXPECT_EQ(second_expected_blob.size(), second_op.data_length()); in TestSplitReplaceOrReplaceBzOperation()
184 brillo::Blob second_data_blob(second_op.data_length()); in TestSplitReplaceOrReplaceBzOperation()
187 second_op.data_length(), in TestSplitReplaceOrReplaceBzOperation()
190 ASSERT_EQ(bytes_read, static_cast<ssize_t>(second_op.data_length())); in TestSplitReplaceOrReplaceBzOperation()
194 EXPECT_EQ(first_op.data_offset() + first_op.data_length(), in TestSplitReplaceOrReplaceBzOperation()
196 EXPECT_EQ(second_op.data_offset() + second_op.data_length(), data_file_size); in TestSplitReplaceOrReplaceBzOperation()
[all …]
Dannotated_operation.cc58 os << InstallOperationTypeName(aop.op.type()) << " " << aop.op.data_length(); in operator <<()
59 if (aop.op.data_length() > 0) in operator <<()
Dpayload_file.cc123 next_blob_offset += aop.op.data_length(); in WritePayload()
296 brillo::Blob buf(aop.op.data_length()); in ReorderDataBlobs()
329 aop.op.data_length())); in ReportPayloadUsage()
330 total_size += aop.op.data_length(); in ReportPayloadUsage()
/system/keymaster/include/keymaster/
Dauthorization_set.h411 return push_back(tag, blob.data, blob.data_length); in push_back()
502 size_t data_length) { in Authorization() argument
503 set.push_back(tag, data, data_length); in Authorization()
509 size_t data_length) { in Authorization() argument
510 return Authorization(tag, reinterpret_cast<const uint8_t*>(data), data_length); in Authorization()
/system/update_engine/payload_consumer/
Ddelta_performer.cc673 CopyDataToBuffer(&c_bytes, &count, op.data_length()); in Write()
890 return (operation.data_offset() + operation.data_length() <= in CanPerformInstallOperation()
903 TEST_AND_RETURN_FALSE(buffer_.size() >= operation.data_length()); in PerformReplaceOperation()
931 TEST_AND_RETURN_FALSE(writer->Write(buffer_.data(), operation.data_length())); in PerformReplaceOperation()
1175 TEST_AND_RETURN_FALSE(buffer_.size() >= operation.data_length()); in PerformBsdiffOperation()
1197 utils::WriteAll(fd, buffer_.data(), operation.data_length())); in PerformBsdiffOperation()
1234 TEST_AND_RETURN_FALSE(buffer_.size() >= operation.data_length()); in PerformSourceBsdiffOperation()
1283 utils::WriteAll(fd, buffer_.data(), operation.data_length())); in PerformSourceBsdiffOperation()
1309 manifest_.signatures_size() == operation.data_length()); in ExtractSignatureMessageFromOperation()
1514 if (!operation.data_length()) { in ValidateOperationHash()
[all …]

123