From ae618fc884d1b2741e63fc7fc7e9e79f1627f3a5 Mon Sep 17 00:00:00 2001 From: Jason Self Date: Sun, 27 Sep 2015 17:46:46 -0700 Subject: [PATCH] Try to debug unchanged /proc/softirqs checksum. --- SHA3api_ref.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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; } -- 2.31.1