sign_virt_apex: Set hash_algorithm flag to sha256

sign_virt_apex actually resigns the virt apex images. Set the
hash_algorithm flag here, to be used for system/vendor images.

Bug: 262892300
Test: Builds
Change-Id: Ibdeaa0ab9a5e0b21cb5ec88940c6a8f968f897df
diff --git a/apex/sign_virt_apex.py b/apex/sign_virt_apex.py
index 4d83c5f..557c8aa 100644
--- a/apex/sign_virt_apex.py
+++ b/apex/sign_virt_apex.py
@@ -239,14 +239,15 @@
         image_size = ReadBytesSize(info['Image size'])
         algorithm = info['Algorithm']
         partition_name = descriptor['Partition Name']
+        hash_algorithm = descriptor['Hash Algorithm']
         partition_size = str(image_size)
-
         cmd = ['avbtool', 'add_hashtree_footer',
                '--key', key,
                '--algorithm', algorithm,
                '--partition_name', partition_name,
                '--partition_size', partition_size,
                '--do_not_generate_fec',
+               '--hash_algorithm', hash_algorithm,
                '--image', image_path]
         if args.signing_args:
             cmd.extend(shlex.split(args.signing_args))