Home
last modified time | relevance | path

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

1234

/system/logging/logd/
DCompressionEngine.cpp30 bool ZlibCompressionEngine::Compress(SerializedData& in, size_t data_length, SerializedData& out) { in Compress() argument
40 CHECK_LE(data_length, in.size()); in Compress()
46 strm.avail_in = data_length; in Compress()
82 bool ZstdCompressionEngine::Compress(SerializedData& in, size_t data_length, SerializedData& out) { in Compress() argument
83 CHECK_LE(data_length, in.size()); in Compress()
85 size_t compress_bound = ZSTD_compressBound(data_length); in Compress()
88 size_t out_size = ZSTD_compress(out.data(), out.size(), in.data(), data_length, 1); in Compress()
DCompressionEngine.h29 virtual bool Compress(SerializedData& in, size_t data_length, SerializedData& out) = 0;
37 bool Compress(SerializedData& in, size_t data_length, SerializedData& out) override;
43 bool Compress(SerializedData& in, size_t data_length, SerializedData& out) override;
/system/keymaster/legacy_support/
Dkeymaster_passthrough_operation.cpp37 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()
73 accumulated_output_size += out.data_length; in Finish()
84 output->write(outBlob.data, outBlob.data_length); in Finish()
106 if (output) output->Reinitialize(out.data, out.data_length); in Finish()
/system/keymaster/tests/
Dandroid_keymaster_messages_test.cpp98 deserialized->issuer_subject.data_length)); in TEST()
133 EXPECT_EQ(3U, chain->entries[0].data_length); in TEST()
135 EXPECT_EQ(3U, chain->entries[1].data_length); in TEST()
137 EXPECT_EQ(3U, chain->entries[2].data_length); in TEST()
176 rsp.maced_public_key.data_length = array_length(TEST_DATA); in TEST()
185 EXPECT_EQ(deserialized->maced_public_key.data_length, rsp.maced_public_key.data_length); in TEST()
187 deserialized->maced_public_key.data_length)); in TEST()
206 EXPECT_EQ(deserialized->keys_to_sign_array[i].data_length, in TEST()
207 req.keys_to_sign_array[i].data_length); in TEST()
210 req.keys_to_sign_array[i].data_length)); in TEST()
[all …]
Dandroid_keymaster_test_utils.cpp75 for (size_t i = 0; i < param.blob.data_length; ++i) in operator <<()
83 for (size_t i = 0; i < param.blob.data_length; ++i) in operator <<()
115 return a.blob.data_length == b.blob.data_length && in operator ==()
116 (memcmp(a.blob.data, b.blob.data, a.blob.data_length) == 0); in operator ==()
Dattestation_record_test.cpp50 return {application_id.data, application_id.data_length}; in GenerateUniqueId()
63 EXPECT_EQ(sizeof(vboot_key_), verified_boot_key.data_length); in VerifyRootOfTrust()
64 if (sizeof(vboot_key_) == verified_boot_key.data_length) { in VerifyRootOfTrust()
138 attestation_challenge.data_length)); in TEST()
143 std::string(reinterpret_cast<const char*>(unique_id.data), unique_id.data_length)); in TEST()
237 attestation_challenge.data_length)); in TEST()
242 std::string(reinterpret_cast<const char*>(unique_id.data), unique_id.data_length)); in TEST()
/system/extras/verity/
Dbuild_verity_tree_test.cpp137 size_t data_length = in TEST_F() local
139 ASSERT_TRUE(builder->Update(data.data() + offset, data_length)); in TEST_F()
140 offset += data_length; in TEST_F()
160 size_t data_length = std::min<size_t>(rand() % 40960, data.size() - offset); in TEST_F() local
161 ASSERT_TRUE(builder->Update(data.data() + offset, data_length)); in TEST_F()
162 offset += data_length; in TEST_F()
182 size_t data_length = std::min<size_t>(rand() % 40960, data.size() - offset); in TEST_F() local
183 ASSERT_TRUE(builder->Update(data.data() + offset, data_length)); in TEST_F()
184 offset += data_length; in TEST_F()
/system/keymaster/km_openssl/
Dblock_cipher_operation.cpp269 if (block_mode_ != KM_MODE_GCM && iv_blob.data_length != block_size_bytes()) { in GetIv()
271 iv_blob.data_length); in GetIv()
275 if (block_mode_ == KM_MODE_GCM && iv_blob.data_length != GCM_NONCE_SIZE) { in GetIv()
277 iv_blob.data_length); in GetIv()
281 iv_ = KeymasterBlob(iv_blob.data, iv_blob.data_length); in GetIv()
312 size_t blocks_to_process = aad.data_length / block_size; in HandleAad()
316 aad.data_length -= blocks_to_process * block_size; in HandleAad()
319 assert(aad.data_length == 0); in HandleAad()
358 size_t to_buffer = min(block_size_bytes() - aad_block_buf_len_, aad->data_length); in FillBufferedAadBlock()
361 aad->data_length -= to_buffer; in FillBufferedAadBlock()
[all …]
Dsoft_keymaster_enforcement.cpp118 if (!HMAC_Update(ctx.get(), chunk.data, chunk.data_length)) { in hmacSha256()
127 if (digest_len != output->data_length) return KM_ERROR_UNKNOWN_ERROR; in hmacSha256()
143 if (!a.data_length && !b.data_length) return true; in operator ==()
145 return (a.data_length == b.data_length && !memcmp(a.data, b.data, a.data_length)); in operator ==()
Dckdf.cpp84 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/update_engine/scripts/update_payload/
Dchecker_unittest.py586 data_length = 10000
595 op, data_length, (data_length + block_size - 1) // block_size,
602 op, data_length, (data_length + block_size - 1) // block_size, 'foo')
608 op, None, (data_length + block_size - 1) // block_size, 'foo')
614 op, data_length, (data_length + block_size - 1) // block_size + 1,
621 data_length = block_size * 3
631 op, data_length, (data_length + block_size - 1) // block_size + 5,
638 op, data_length, (data_length + block_size - 1) // block_size + 5,
645 op, None, (data_length + block_size - 1) // block_size, 'foo')
651 op, data_length, (data_length + block_size - 1) // block_size, 'foo')
[all …]
Dtest_utils.py198 data_length=None, src_extents=None, src_length=None, argument
212 _SetMsgField(op, 'data_length', data_length)
281 data_length = len(data_blob)
283 self.curr_offset += data_length
285 return data_length, data_offset
306 data_offset = data_length = data_sha256_hash = None
310 data_length, data_offset = self.AddData(data_blob)
313 data_length=data_length, src_extents=src_extents,
Dchecker.py755 def _CheckReplaceOperation(self, op, data_length, total_dst_blocks, op_name): argument
777 if data_length is None:
781 PayloadChecker._CheckBlocksFitLength(data_length, total_dst_blocks,
786 if data_length >= total_dst_blocks * self.block_size:
790 (op_name, data_length, total_dst_blocks, self.block_size))
805 if op.data_length:
810 def _CheckAnyDiffOperation(self, op, data_length, total_dst_blocks, op_name): argument
824 if data_length is None:
828 if data_length >= total_dst_blocks * self.block_size:
832 (op_name, data_length, total_dst_blocks, self.block_size,
[all …]
Dpayload.py172 if op.data_length > 0:
173 return op.data_offset + op.data_length
334 if op.data_length == 0:
339 blob = self.ReadDataBlob(op.data_offset, op.data_length)
/system/core/libappfuse/
DFuseBuffer.cc190 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/keymaster/contexts/
Dsoft_keymaster_device.cpp584 const uint8_t* data, size_t data_length) { in add_rng_entropy() argument
588 if (km1_dev) return km1_dev->add_rng_entropy(km1_dev, data, data_length); in add_rng_entropy()
592 request.random_data.Reinitialize(data, data_length); in add_rng_entropy()
601 const uint8_t* data, size_t data_length) { in add_rng_entropy() argument
607 return add_rng_entropy(&sk_dev->km1_device_, data, data_length); in add_rng_entropy()
886 request.key_data = KeymasterKeyBlob(key_data->data, key_data->data_length); in import_key()
949 export_data->data_length = 0; in export_key()
961 export_data->data_length = response.key_data_length; in export_key()
962 uint8_t* tmp = reinterpret_cast<uint8_t*>(malloc(export_data->data_length)); in export_key()
964 memcpy(tmp, response.key_data, export_data->data_length); in export_key()
[all …]
/system/update_engine/payload_generator/
Dpayload_file_unittest.cc78 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()
Dab_generator_unittest.cc148 EXPECT_EQ(first_expected_blob.size(), first_op.data_length()); in TestSplitReplaceOrReplaceXzOperation()
150 brillo::Blob first_data_blob(first_op.data_length()); in TestSplitReplaceOrReplaceXzOperation()
154 first_op.data_length(), in TestSplitReplaceOrReplaceXzOperation()
157 ASSERT_EQ(bytes_read, static_cast<ssize_t>(first_op.data_length())); in TestSplitReplaceOrReplaceXzOperation()
178 EXPECT_EQ(second_expected_blob.size(), second_op.data_length()); in TestSplitReplaceOrReplaceXzOperation()
180 brillo::Blob second_data_blob(second_op.data_length()); in TestSplitReplaceOrReplaceXzOperation()
183 second_op.data_length(), in TestSplitReplaceOrReplaceXzOperation()
186 ASSERT_EQ(bytes_read, static_cast<ssize_t>(second_op.data_length())); in TestSplitReplaceOrReplaceXzOperation()
190 EXPECT_EQ(first_op.data_offset() + first_op.data_length(), in TestSplitReplaceOrReplaceXzOperation()
192 EXPECT_EQ(second_op.data_offset() + second_op.data_length(), in TestSplitReplaceOrReplaceXzOperation()
[all …]
Dannotated_operation.cc58 os << InstallOperationTypeName(aop.op.type()) << " " << aop.op.data_length(); in operator <<()
59 if (aop.op.data_length() > 0) in operator <<()
/system/core/libappfuse/include/libappfuse/
DFuseBuffer.h70 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/keymaster/android_keymaster/
Dauthorization_set.cpp205 void* tmp = malloc(src.blob.data_length); in CopyToParamSet()
206 memcpy(tmp, src.blob.data, src.blob.data_length); in CopyToParamSet()
272 if (indirect_data_capacity_ - indirect_data_size_ < elem.blob.data_length) in push_back()
273 if (!reserve_indirect(2 * (indirect_data_capacity_ + elem.blob.data_length))) in push_back()
276 memcpy(indirect_data_ + indirect_data_size_, elem.blob.data, elem.blob.data_length); in push_back()
278 indirect_data_size_ += elem.blob.data_length; in push_back()
335 buf = append_uint32_to_buf(buf, end, param.blob.data_length); in serialize()
377 if (!copy_uint32_from_buf(buf_ptr, end, &param->blob.data_length) || in deserialize()
380 if (param->blob.data_length + offset < param->blob.data_length || // Overflow check in deserialize()
382 static_cast<ptrdiff_t>(offset + param->blob.data_length) > indirect_end - indirect_base) in deserialize()
[all …]
/system/core/fs_mgr/libsnapshot/libsnapshot_cow/
Dinspect_cow.cpp86 auto buffer = std::make_unique<uint8_t[]>(op.data_length); in ShowBad()
88 if (!reader.GetRawBytes(op.source, buffer.get(), op.data_length, &count)) { in ShowBad()
92 for (int i = 0; i < op.data_length; i++) { in ShowBad()
96 if (op.data_length >= sizeof(CowOperation)) { in ShowBad()
176 size_t seq_len = op.data_length / sizeof(uint32_t); in Inspect()
178 if (!reader.GetRawBytes(op.source, merge_op_blocks.data(), op.data_length, &read)) { in Inspect()
Dcow_format.cpp57 os << "data_length:" << op.data_length << ",\t"; in operator <<()
70 return op.data_length; in GetNextOpOffset()
/system/keymaster/include/keymaster/
Dandroid_keymaster_utils.h105 return blob->data_length; in accessBlobSize()
108 return blob->data_length; in accessBlobSize()
311 retval.entries[i].data_length = other.entries[i].data_length; in clone()
312 retval.entries[i].data = new (std::nothrow) uint8_t[retval.entries[i].data_length]; in clone()
316 retval.entries[i].data_length); in clone()
/system/core/fs_mgr/libsnapshot/include/libsnapshot/
Dcow_format.h93 uint16_t data_length; member
122 uint16_t data_length; member

1234