Lines Matching refs:pack
227 ret.extend(struct.pack('!B', octet))
236 return struct.pack('!QQ', self.modulus_bits, pkey_n0) + modulus + pkey_prr
419 self.img_handler.write(struct.pack(num_chunks_and_blocks_format,
447 self.img_handler.write(struct.pack(ImageChunk.CHUNK_HEADER_FORMAT,
478 self.img_handler.write(struct.pack(ImageChunk.CHUNK_HEADER_FORMAT,
511 self.img_handler.write(struct.pack(ImageChunk.CHUNK_HEADER_FORMAT,
645 self.img_handler.write(struct.pack(ImageChunk.CHUNK_HEADER_FORMAT,
737 self.hvb_cert_content += struct.pack('I', self.HVB_VERSION_MAJOR)
738 self.hvb_cert_content += struct.pack('I', self.HVB_VERSION_MINOR)
745 self.hvb_cert_content += struct.pack('Q', self.original_image_length)
746 self.hvb_cert_content += struct.pack('Q', self.img_len_with_padding)
748 self.hvb_cert_content += struct.pack('2Q', int(_params['rollback_location']), int(_params['rollback_index']))
762 hash_algo = struct.pack('I', halgo)
763 salt_offset = struct.pack('Q', 240) # 根据HVB证书格式,salt偏移位置固定,为240字节的偏移
764 salt_size = struct.pack('Q', len(self.salt))
765 digest_offset = struct.pack('Q', 240 + len(self.salt))
766 digest_size = struct.pack('Q', len(self.digest))
849 return hashtree_struct.pack(*dlist)
884 self.hvb_cert_content += struct.pack('I', verity_type) + hashinfo
905 self.hvb_cert_content += struct.pack('Q', sig_length) + struct.pack('I', algo.sig_algo) \
906 + struct.pack('I', flags) + struct.pack('Q', keyblock_offset) \
907 + struct.pack('Q', len(keyblock)) + struct.pack('Q', signature_offset) \
908 + struct.pack('Q', algo.sig_bytes) + b'\0' * 64 + keyblock
945 + struct.pack('4Q', cert_offset, cert_size, self.original_image_length, self.partition_size) \
953 rvtcontent += struct.pack('I', verity_num) + b'\0' * 64 # rvt_reversed: 64 bytes
969 rvtcontent += struct.pack('Q', pubkey_offset) # pubkey_offset
970 rvtcontent += struct.pack('Q', pubkey_len) # pubkey_len