Try to debug unchanged /proc/softirqs checksum.
authorJason Self <j@jxself.org>
Mon, 28 Sep 2015 00:46:46 +0000 (17:46 -0700)
committerJason Self <j@jxself.org>
Mon, 28 Sep 2015 00:46:46 +0000 (17:46 -0700)
SHA3api_ref.c

index e5b589fd31fe04e07a1111e5b58cb9a3d273a7e6..19858c1d895eed8b94b39742e4be62263d68e440 100644 (file)
 #include <string.h>     /* get the memcpy/memset functions */\r
 #include "skein.h"      /* get the Skein API definitions   */\r
 #include "SHA3api_ref.h"/* get the  AHS  API definitions   */\r
+
+//#define SKEIN_DEBUG 1
+#ifdef SKEIN_DEBUG
+#  include <stdio.h>
+#  include <stdlib.h>
+#  include <string.h>
+#endif
+
 \r
 /******************************************************************/\r
 /*     AHS API code                                               */\r
@@ -111,5 +119,16 @@ HashReturn Hash(int hashbitlen, const BitSequence *data, /* all-in-one call */
         r = Update(&state,data,databitlen);\r
         Final(&state,hashval);\r
         }\r
+#ifdef SKEIN_DEBUG
+    if (r == SUCCESS && getenv("SKEIN_DEEP_DUMP"))
+        {
+        printf("==== Hashbitlen = %d, DataBitLen = %llu, Data:\n%s\n==== Hash:\n",
+            hashbitlen, (long long unsigned)databitlen, (const char*)data);
+        int i;
+        for (i = 0; i < hashbitlen / 8; i++)
+            printf("%02X", hashval[i]);
+        }
+        printf("\n");
+#endif
     return r;\r
     }\r