#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
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