]> wimlib.net Git - wimlib/blobdiff - src/sha1.c
Fix various NTFS capture issues
[wimlib] / src / sha1.c
index dd4e26293040f0860b2dfcdb6ccfbaa9d341c88a..28a71848cbe4bf3a9e7a587902ae0973ede1caf1 100644 (file)
  * Steve Reid's public domain code, or based on Intel's SSSE3 SHA1 code.
  */
 
-#ifndef WITH_LIBCRYPTO
+const u8 zero_hash[SHA1_HASH_SIZE] = {
+       0, 0, 0, 0, 0,
+       0, 0, 0, 0, 0,
+       0, 0, 0, 0, 0,
+       0, 0, 0, 0, 0,
+};
+
 
+#ifndef WITH_LIBCRYPTO
 
 /*  Initialize new context */
 void sha1_init(SHA_CTX* context)
@@ -179,7 +186,7 @@ void sha1_final(u8 md[SHA1_HASH_SIZE], SHA_CTX* context)
        while ((context->count[0] & 504) != 448) {
                sha1_update(context, (u8 *)"\0", 1);
        }
-       sha1_update(context, finalcount, 8);  /* Should cause a SHA1_Transform() */
+       sha1_update(context, finalcount, 8);  /* Should cause a sha1_transform() */
        for (i = 0; i < SHA1_HASH_SIZE; i++) {
                md[i] = (u8)((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255);
        }