sign_android_image: calculate and store the vb meta digest

For verified boot, one of the boot parameters is the vb meta
digest. The vb meta digest will be set to the hash of the
hashes of the system and vendor images. The hash will be
calculated and stored in a file in the same directory as the
images. Later, the file will be read to retrieve the value
for vb meta digest.

ARC Keymint CL: https://crrev.com/c/5809618

BUG=b:350826304
TEST=./sign_android_unittests.sh
TEST=manually compare arcvm_vbmeta_digest.sha256 and sha256sum
output on dut with locally signed image
BRANCH=none

Change-Id: Icab0a5002a6b0f6537c75b5124587b0a92270f26
Signed-off-by: Luzanne Batoon <[email protected]>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/5826996
Reviewed-by: Vaibhav Raheja <[email protected]>
Reviewed-by: Julius Werner <[email protected]>
1 file changed