Lines Matching refs:hash_desc
79 AvbHashDescriptor hash_desc; in load_and_verify_hash_partition() local
94 (const AvbHashDescriptor*)descriptor, &hash_desc)) { in load_and_verify_hash_partition()
101 desc_salt = desc_partition_name + hash_desc.partition_name_len; in load_and_verify_hash_partition()
102 desc_digest = desc_salt + hash_desc.salt_len; in load_and_verify_hash_partition()
104 if (!avb_validate_utf8(desc_partition_name, hash_desc.partition_name_len)) { in load_and_verify_hash_partition()
115 hash_desc.partition_name_len); in load_and_verify_hash_partition()
124 hash_desc.partition_name_len, in load_and_verify_hash_partition()
140 image_size = hash_desc.image_size; in load_and_verify_hash_partition()
184 if (avb_strcmp((const char*)hash_desc.hash_algorithm, "sha256") == 0) { in load_and_verify_hash_partition()
187 avb_sha256_update(&sha256_ctx, desc_salt, hash_desc.salt_len); in load_and_verify_hash_partition()
188 avb_sha256_update(&sha256_ctx, image_buf, hash_desc.image_size); in load_and_verify_hash_partition()
191 } else if (avb_strcmp((const char*)hash_desc.hash_algorithm, "sha512") == 0) { in load_and_verify_hash_partition()
194 avb_sha512_update(&sha512_ctx, desc_salt, hash_desc.salt_len); in load_and_verify_hash_partition()
195 avb_sha512_update(&sha512_ctx, image_buf, hash_desc.image_size); in load_and_verify_hash_partition()
204 if (digest_len != hash_desc.digest_len) { in load_and_verify_hash_partition()