Lines Matching full:foo*
70 FOOTERMAGIC = b'HVB' + b'\0' * 5
71 FOOTER_FORMAT = ('8s' # Magic
76 def __init__(self, footer=None):
77 self.foot = footer
78 if self.foot:
80 self.partition_size, _) = struct.unpack(self.FOOTER_FORMAT, footer)
81 if self.magic != self.FOOTERMAGIC:
82 raise HvbError('Given footer does not look like a HVB footer.')
84 raise HvbError('Given footer is None.')
87 msg = "[HVB footer]: \n"
88 if self.foot:
95 msg += "There is no footer. \n\n"
673 FOOTER_SIZE = 104
933 self.footer = b''
934 footer_magic = self.MAGIC + b'\0' * 4
944 self.footer += footer_magic \
1001 padding = round_to_multiple((hvb_cert_length + self.FOOTER_SIZE), self.block_size)
1002 if padding > (hvb_cert_length + self.FOOTER_SIZE):
1003 cert_and_footer = self.hvb_cert_content + b'\0' * (padding - (self.FOOTER_SIZE + hvb_cert_length)) + \
1004 self.footer
1006 cert_and_footer = self.hvb_cert_content + self.footer
1012 hashtree_length - hvb_cert_length - self.FOOTER_SIZE) + self.footer
1050 image.seek(self.original_image_length - self.FOOTER_SIZE)
1051 footer_bin = image.read(self.FOOTER_SIZE)
1052 footer = HvbFooter(footer_bin)
1053 footer.info_footer()
1055 image.seek(footer.certoffset)
1056 cert_bin = image.read(footer.certsize)
1068 image.seek(self.original_image_length - self.FOOTER_SIZE)
1069 footer_bin = image.read(self.FOOTER_SIZE)
1070 footer = HvbFooter(footer_bin)
1072 image.truncate(footer.imagesize)