]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Add a crude hash calculation debugging facility
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 3 Jun 2010 18:24:44 +0000 (20:24 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 3 Jun 2010 19:39:48 +0000 (21:39 +0200)
mdfour.c

index 5fee4f0e38dc9ca508a22b0e45f4faee6a8bffdb..78fca282d1083876be9523361b61283631710271 100644 (file)
--- a/mdfour.c
+++ b/mdfour.c
@@ -139,6 +139,12 @@ void mdfour_update(struct mdfour *md, const unsigned char *in, size_t n)
 {
        uint32_t M[16];
 
+#ifdef CCACHE_DEBUG_HASH
+       FILE* f = fopen("ccache-debug-hash.bin", "a");
+       fwrite(in, 1, n, f);
+       fclose(f);
+#endif
+
        m = md;
 
        if (in == NULL) {