Copyright(c) 2011-2016 Intel Corporation All rights reserved.
Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
+ modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
printf("\n");
}
-int compare_digests(uint32_t hash_base[SHA1_DIGEST_WORDS],
+int compare_digests(uint32_t hash_ref[SHA1_DIGEST_WORDS],
uint32_t hash_test[SHA1_DIGEST_WORDS])
{
int i;
int mh_sha1_fail = 0;
for (i = 0; i < SHA1_DIGEST_WORDS; i++) {
- if (hash_test[i] != hash_base[i])
+ if (hash_test[i] != hash_ref[i])
mh_sha1_fail++;
}
if (mh_sha1_fail) {
printf("mh_sha1 fail test\n");
- printf("base: ");
- dump((char *)hash_base, 20);
printf("ref: ");
+ dump((char *)hash_ref, 20);
+ printf("test: ");
dump((char *)hash_test, 20);
}