Home
last modified time | relevance | path

Searched refs:CHUNK_SIZE (Results 1 – 15 of 15) sorted by relevance

/packages/modules/Virtualization/authfs/src/fsverity/
Dbuilder.rs18 use crate::common::{divide_roundup, CHUNK_SIZE};
22 const HASH_PER_PAGE: usize = CHUNK_SIZE as usize / HASH_SIZE;
66 let leaves_size = divide_roundup(new_file_size, CHUNK_SIZE); in resize()
109 debug_assert!(self.file_size <= CHUNK_SIZE && self.file_size > 0); in calculate_root_hash()
113 debug_assert_eq!((self.file_size - 1) / CHUNK_SIZE, n as u64); in calculate_root_hash()
114 let size_for_equivalent = n as u64 * CHUNK_SIZE; in calculate_root_hash()
197 let hash = Sha256Hasher::new()?.update(&vec![1u8; CHUNK_SIZE as usize])?.finalize()?; in merkle_tree_non_sequential()
200 tree.update_hash(1, &hash, CHUNK_SIZE * 2); in merkle_tree_non_sequential()
201 tree.update_hash(3, &hash, CHUNK_SIZE * 4); in merkle_tree_non_sequential()
202 tree.update_hash(0, &hash, CHUNK_SIZE); in merkle_tree_non_sequential()
[all …]
Dverifier.rs21 use crate::common::{divide_roundup, CHUNK_SIZE};
25 const ZEROS: [u8; CHUNK_SIZE as usize] = [0u8; CHUNK_SIZE as usize];
45 let chunk_hash = hash_with_padding(chunk, CHUNK_SIZE as usize)?; in verity_check()
49 if file_size <= CHUNK_SIZE { in verity_check()
62 Ok(hash_with_padding(&merkle_chunk, CHUNK_SIZE as usize)?) in verity_check()
77 let hashes_per_node = CHUNK_SIZE / Sha256Hasher::HASH_SIZE as u64;
84 let leaves_size_per_hash = CHUNK_SIZE * leaves_per_hash;
87 let level_size = nodes_at_level * CHUNK_SIZE;
98 let chunk_index = global_hash_offset / CHUNK_SIZE;
99 let hash_offset_in_chunk = (global_hash_offset % CHUNK_SIZE) as usize;
[all …]
Dcommon.rs22 use crate::common::{divide_roundup, CHUNK_SIZE};
50 let hashes_per_node = CHUNK_SIZE / Sha256Hasher::HASH_SIZE as u64; in merkle_tree_height()
51 let hash_pages = divide_roundup(data_size, hashes_per_node * CHUNK_SIZE); in merkle_tree_height()
58 while data_size > CHUNK_SIZE { in merkle_tree_size()
59 let hash_size = divide_roundup(data_size, CHUNK_SIZE) * Sha256Hasher::HASH_SIZE as u64; in merkle_tree_size()
60 let hash_storage_size = divide_roundup(hash_size, CHUNK_SIZE) * CHUNK_SIZE; in merkle_tree_size()
Deditor.rs59 use crate::common::{ChunkedSizeIter, CHUNK_SIZE};
142 let mut orig_data = [0u8; CHUNK_SIZE as usize]; in new_hash_for_incomplete_write()
171 if current_size as u64 == CHUNK_SIZE { in new_chunk_hash()
207 ChunkedSizeIter::new(buf.len(), offset, CHUNK_SIZE as usize) in write_at()
215 let output_chunk_index = (output_offset / CHUNK_SIZE) as usize; in write_at()
216 let offset_from_alignment = (output_offset % CHUNK_SIZE) as usize; in write_at()
267 if size < merkle_tree.file_size() && size % CHUNK_SIZE > 0 { in resize()
268 let new_tail_size = (size % CHUNK_SIZE) as usize; in resize()
269 let chunk_index = size / CHUNK_SIZE; in resize()
271 let mut buf: ChunkBuffer = [0; CHUNK_SIZE as usize]; in resize()
[all …]
/packages/modules/Virtualization/authfs/src/fsverity/metadata/
Dmetadata.rs71 pub const CHUNK_SIZE: u64 = authfs_fsverity_metadata_bindgen::CHUNK_SIZE; constant
138 (metadata_file.stream_position()? + CHUNK_SIZE - 1) / CHUNK_SIZE * CHUNK_SIZE; in parse_fsverity_metadata()
Dmetadata.hpp48 const uint64_t CHUNK_SIZE = 4096; variable
/packages/modules/Virtualization/authfs/src/
Dfile.rs15 use crate::common::{divide_roundup, CHUNK_SIZE};
22 pub type ChunkBuffer = [u8; CHUNK_SIZE as usize];
94 let last_index = divide_roundup(file_size, CHUNK_SIZE); in new()
97 let mut chunk_buffer = [0; CHUNK_SIZE as usize]; in new()
115 if let Some(chunk) = &self.buffer.chunks(CHUNK_SIZE as usize).nth(chunk_index as usize) { in read_chunk()
Dfusefs.rs39 use crate::common::{divide_roundup, ChunkedSizeIter, CHUNK_SIZE};
390 fn blk_size() -> libc::c_int { CHUNK_SIZE as libc::c_int }
392 fn blk_size() -> libc::c_long { CHUNK_SIZE as libc::c_long }
459 offset / CHUNK_SIZE in offset_to_chunk_index()
471 let total = ChunkedSizeIter::new(size_to_read, offset, CHUNK_SIZE as usize).try_fold( in read_chunks()
478 let mut buf = [0u8; CHUNK_SIZE as usize]; in read_chunks()
484 let begin = (current_offset % CHUNK_SIZE) as usize; in read_chunks()
Dcommon.rs18 pub const CHUNK_SIZE: u64 = 4096; constant
/packages/modules/Virtualization/authfs/src/file/
Dremote_file.rs23 use crate::common::CHUNK_SIZE;
31 let offset = i64::try_from(chunk_index * CHUNK_SIZE) in remote_read_chunk()
95 let offset = i64::try_from(chunk_index * CHUNK_SIZE) in read_chunk()
/packages/modules/adb/client/
Dincremental.cpp230 std::vector<char> child_stdout(CHUNK_SIZE); in wait_for_installation()
257 child_stdout.resize(buf_size + CHUNK_SIZE); in wait_for_installation()
Dcommandline.cpp829 int opt = CHUNK_SIZE; in adb_sideload_legacy()
832 char buf[CHUNK_SIZE]; in adb_sideload_legacy()
835 unsigned xfer = (size > CHUNK_SIZE) ? CHUNK_SIZE : size; in adb_sideload_legacy()
860 #define SIDELOAD_HOST_BLOCK_SIZE (CHUNK_SIZE)
/packages/modules/adb/
Dadb.h209 #define CHUNK_SIZE (64 * 1024) macro
Dadb_listeners.cpp82 int rcv_buf_size = CHUNK_SIZE; in ss_listener_event_func()
/packages/modules/DnsResolver/
DDnsTlsSocket.cpp641 constexpr uint16_t CHUNK_SIZE = 2048; in readResponse() local
642 std::vector<uint8_t> discard(std::min(remainingBytes, CHUNK_SIZE)); in readResponse()