]> wimlib.net Git - wimlib/blobdiff - src/integrity.c
SHA-1 rework
[wimlib] / src / integrity.c
index 7494c3245057ff9ef0f6a582b6add37ef62ce6f6..e0d4447c17e18b18dd15b8bee3e5f18baa24d9df 100644 (file)
@@ -59,7 +59,7 @@ calculate_chunk_sha1(struct filedes *in_fd, size_t this_chunk_size,
                     off_t offset, u8 sha1_md[])
 {
        u8 buf[BUFFER_SIZE];
-       SHA_CTX ctx;
+       struct sha1_ctx ctx;
        size_t bytes_remaining;
        size_t bytes_to_read;
        int ret;
@@ -78,7 +78,7 @@ calculate_chunk_sha1(struct filedes *in_fd, size_t this_chunk_size,
                bytes_remaining -= bytes_to_read;
                offset += bytes_to_read;
        } while (bytes_remaining);
-       sha1_final(sha1_md, &ctx);
+       sha1_final(&ctx, sha1_md);
        return 0;
 }