Skip to content

Commit

Permalink
print calculated integrity hash
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill Yang committed Jun 13, 2024
1 parent 570d200 commit a61d352
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions util/fipstools/inject_hash/inject_hash_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,13 @@ int inject_hash_no_write(const char *ar_input, const char *o_input, const char *
goto end;
}

// Print calculated hash for reference
printf("Calculated hash: ");
for (unsigned int i = 0; i < calculated_hash_len; i++) {
printf("%02X", calculated_hash[i]);
}
printf("\n");

memcpy(*object_bytes + hash_index, calculated_hash, calculated_hash_len);

ret = 1;
Expand Down

0 comments on commit a61d352

Please sign in to comment.