Bugfix SKEIN_DEEP_DUMP printing.
authorJason Self <j@jxself.org>
Mon, 28 Sep 2015 00:55:20 +0000 (17:55 -0700)
committerJason Self <j@jxself.org>
Mon, 28 Sep 2015 00:55:20 +0000 (17:55 -0700)
SHA3api_ref.c

index 19858c1d895eed8b94b39742e4be62263d68e440..cab5c69f9ac5b08c79ebd881aedbc1dc384fb3c8 100644 (file)
@@ -118,17 +118,17 @@ HashReturn Hash(int hashbitlen, const BitSequence *data, /* all-in-one call */
         { /* these calls do not fail when called properly */\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");
+        if (r == SUCCESS && getenv("SKEIN_DEEP_DUMP"))
+            {
+            int i;
+            printf("==== Hashbitlen = %d, DataBitLen = %llu, Data:\n%s\n==== Hash:\n",
+                hashbitlen, (long long unsigned)databitlen, (const char*)data);
+            for (i = 0; i < hashbitlen / 8; i++)
+                printf("%02X", hashval[i]);
+            printf("\n");
+            }
 #endif
+        }\r
     return r;\r
     }\r