Lines Matching full:block_size
733 block_size: The block size, typically 4096.
772 self.block_size = 4096
784 block_size, self._num_total_blocks, self._num_total_chunks,
800 self.block_size = block_size
819 if data_sz != (chunk_sz * self.block_size):
822 format(data_sz, chunk_sz*self.block_size))
826 chunk_sz*self.block_size,
839 chunk_sz*self.block_size,
849 chunk_sz*self.block_size,
861 output_offset += chunk_sz*self.block_size
907 assert num_bytes % self.block_size == 0
922 self._num_total_blocks += num_bytes // self.block_size
929 num_bytes // self.block_size,
944 assert len(data) % self.block_size == 0
956 self._num_total_blocks += len(data) // self.block_size
963 len(data) // self.block_size,
983 assert size % self.block_size == 0
995 self._num_total_blocks += size // self.block_size
1002 size // self.block_size,
1097 if size % self.block_size != 0:
1113 assert num_to_keep % self.block_size == 0
1126 chunk_sz = num_to_keep // self.block_size
1143 self._num_total_blocks += self._chunks[i].output_size // self.block_size
1347 image_size: Size of the image, after rounding up to |block_size|.
2317 data_zeroed_firstblock = b'ZeRoHaSH' + b'\0' * (image.block_size - 8)
2319 image.append_fill(b'\0\0\0\0', zero_ht_num_bytes - image.block_size)
2322 image.append_fill(b'\0\0\0\0', zero_fec_num_bytes - image.block_size)
2337 if partition_size % image.block_size != 0:
2340 image.block_size))
2348 if vbmeta_end_offset % image.block_size != 0:
2349 vbmeta_end_offset += image.block_size - (vbmeta_end_offset
2350 % image.block_size)
2352 if partition_size < vbmeta_end_offset + 1 * image.block_size:
2356 vbmeta_end_offset + 1 * image.block_size))
2363 1 * image.block_size)
2368 footer_blob_with_padding = (b'\0' * (image.block_size - AvbFooter.SIZE) +
3264 if partition_size % image.block_size != 0:
3267 image.block_size))
3292 if image.image_size % image.block_size != 0:
3294 padding_needed = image.block_size - (image.image_size%image.block_size)
3298 # multiple of |block_size| so add padding as needed. Also record
3302 padding_needed = (round_to_multiple(len(vbmeta_blob), image.block_size) -
3313 1 * image.block_size)
3323 footer_blob_with_padding = (b'\0' * (image.block_size - AvbFooter.SIZE) +
3438 original_image_size + max_metadata_size, image.block_size)
3441 if partition_size % image.block_size != 0:
3444 image.block_size))
3507 if image.image_size % image.block_size != 0:
3509 padding_needed = image.block_size - (
3510 image.image_size % image.block_size)
3514 # multiple of |block_size| so add padding as needed. Also record
3519 round_to_multiple(len(vbmeta_blob), image.block_size) -
3529 1 * image.block_size)
3540 b'\0' * (image.block_size - AvbFooter.SIZE) + footer_blob)
3549 block_size, salt, chain_partitions, algorithm_name, argument
3576 block_size: Block size to use.
3638 partition_size, block_size, digest_size + digest_padding)
3656 if partition_size % image.block_size != 0:
3659 image.block_size))
3660 elif image.image_size % image.block_size != 0:
3663 image.block_size))
3684 # Ensure image is multiple of block_size.
3685 rounded_image_size = round_to_multiple(image.image_size, block_size)
3712 image.image_size, block_size, digest_size + digest_padding)
3716 if image.image_size % image.block_size != 0:
3718 padding_needed = image.block_size - (image.image_size%image.block_size)
3724 block_size,
3740 ht_desc.data_block_size = block_size
3741 ht_desc.hash_block_size = block_size
3753 padding_needed = (round_to_multiple(len(hash_tree), image.block_size) -
3765 padding_needed = (round_to_multiple(len(fec_data), image.block_size) -
3790 padding_needed = (round_to_multiple(len(vbmeta_blob), image.block_size) -
3806 1 * image.block_size)
3817 b'\0' * (image.block_size - AvbFooter.SIZE) + footer_blob)
3988 def calc_hash_level_offsets(image_size, block_size, digest_size): argument
3993 block_size: The block size, e.g. 4096.
4006 while size > block_size:
4007 num_blocks = (size + block_size - 1) // block_size
4008 level_size = round_to_multiple(num_blocks * digest_size, block_size)
4088 def generate_hash_tree(image, image_size, block_size, hash_alg_name, salt, argument
4095 block_size: The block size, e.g. 4096.
4112 if hash_src_size == block_size:
4115 hasher.update(image.read(block_size))
4118 while hash_src_size > block_size:
4127 data = image.read(min(remaining, block_size))
4130 data = hash_ret[offset:offset + block_size]
4134 if len(data) < block_size:
4135 hasher.update(b'\0' * (block_size - len(data)))
4143 len(level_output), block_size) - len(level_output))
4408 sub_parser.add_argument('--block_size',
4814 args.hash_algorithm, args.block_size,