projects
/
skeinsum.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6591988
)
Try to debug unchanged /proc/softirqs checksum.
author
Jason Self
<j@jxself.org>
Mon, 28 Sep 2015 00:46:46 +0000
(17:46 -0700)
committer
Jason Self
<j@jxself.org>
Mon, 28 Sep 2015 00:46:46 +0000
(17:46 -0700)
SHA3api_ref.c
patch
|
blob
|
history
diff --git
a/SHA3api_ref.c
b/SHA3api_ref.c
index e5b589fd31fe04e07a1111e5b58cb9a3d273a7e6..19858c1d895eed8b94b39742e4be62263d68e440 100644
(file)
--- a/
SHA3api_ref.c
+++ b/
SHA3api_ref.c
@@
-11,6
+11,14
@@
#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
#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
/******************************************************************/
\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
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
return r;
\r
}
\r