Factor out the hashtree info from the verity_info
Even though the format for the VB2.0(AVB) image is different from the VB1.0
image, the majority of the content is the same. In specific, they both
have a hashtree and ecc data. By factoring the hashtree info, fec_read
can later use only the hashtree for error correction and doesn't need to
have the knowledge of verity format.
VB 1.0:
Filesystem
hash_tree
metadata <- assume 8 blocks
ecc_data
VB 2.0:
Filesystem
hash_tree
ecc_data
vbmeta
avb footer
Also switch the internal struct to use std containers so that we don't
need to worry about the memory management.
Bug: 144388532
Test: load a verity image, unit tests pass
Change-Id: I83c55464c3ac75ac41be9f507b674886ad298350
4 files changed