}
struct hasher_context {
- SHA_CTX sha_ctx;
+ struct sha1_ctx sha_ctx;
int flags;
struct read_blob_callbacks cbs;
};
report_sha1_mismatch(struct blob_descriptor *blob,
const u8 actual_hash[SHA1_HASH_SIZE], bool recover_data)
{
- tchar expected_hashstr[SHA1_HASH_SIZE * 2 + 1];
- tchar actual_hashstr[SHA1_HASH_SIZE * 2 + 1];
+ tchar expected_hashstr[SHA1_HASH_STRING_LEN];
+ tchar actual_hashstr[SHA1_HASH_STRING_LEN];
wimlib_assert(blob->blob_location != BLOB_NONEXISTENT);
wimlib_assert(blob->blob_location != BLOB_IN_ATTACHED_BUFFER);
}
/* Retrieve the final SHA-1 message digest. */
- sha1_final(hash, &ctx->sha_ctx);
+ sha1_final(&ctx->sha_ctx, hash);
/* Set the SHA-1 message digest of the blob, or compare the calculated
* value with stored value. */