From: Jason Self Date: Mon, 28 Sep 2015 00:46:46 +0000 (-0700) Subject: Try to debug unchanged /proc/softirqs checksum. X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=ae618fc884d1b2741e63fc7fc7e9e79f1627f3a5;p=skeinsum.git Try to debug unchanged /proc/softirqs checksum. --- diff --git a/SHA3api_ref.c b/SHA3api_ref.c index e5b589f..19858c1 100644 --- a/SHA3api_ref.c +++ b/SHA3api_ref.c @@ -11,6 +11,14 @@ #include /* get the memcpy/memset functions */ #include "skein.h" /* get the Skein API definitions */ #include "SHA3api_ref.h"/* get the AHS API definitions */ + +//#define SKEIN_DEBUG 1 +#ifdef SKEIN_DEBUG +# include +# include +# include +#endif + /******************************************************************/ /* AHS API code */ @@ -111,5 +119,16 @@ HashReturn Hash(int hashbitlen, const BitSequence *data, /* all-in-one call */ r = Update(&state,data,databitlen); Final(&state,hashval); } +#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; }