aboutsummaryrefslogtreecommitdiffstats
path: root/c/sha3.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-06-16 23:48:26 +0200
committerMattias Andrée <maandree@operamail.com>2013-06-16 23:48:26 +0200
commit42c0197d1858200b09d4e0523b44dc1e150cb2df (patch)
treed5f4215ca3716abde3b9f949dbb6053d6ed6bb80 /c/sha3.h
parentm (diff)
downloadsha3sum-42c0197d1858200b09d4e0523b44dc1e150cb2df.tar.gz
sha3sum-42c0197d1858200b09d4e0523b44dc1e150cb2df.tar.bz2
sha3sum-42c0197d1858200b09d4e0523b44dc1e150cb2df.tar.xz
misc
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'c/sha3.h')
-rw-r--r--c/sha3.h32
1 files changed, 29 insertions, 3 deletions
diff --git a/c/sha3.h b/c/sha3.h
index faf94d1..fbcf346 100644
--- a/c/sha3.h
+++ b/c/sha3.h
@@ -48,8 +48,34 @@ extern void update(char* msg, long msglen);
/**
* Absorb the last part of the message and squeeze the Keccak sponge
*
- * @param msg The rest of the message, may be {@code null}
- * @param msglen The length of the partial message
+ * @param msg The rest of the message, may be {@code null}
+ * @param msglen The length of the partial message
+ * @param withReturn Whether to return the hash instead of just do a quick squeeze phrase and return {@code null}
+ * @return The hash sum, or {@code null} if <tt>withReturn</tt> is {@code false}
+ */
+extern char* digest(char* msg, long msglen, long withReturn);
+
+
+/**
+ * Force some rounds of Keccak-f
+ *
+ * @param times The number of rounds
+ */
+extern void simpleSqueeze(long times);
+
+
+/**
+ * Squeeze as much as is needed to get a digest a number of times
+ *
+ * @param times The number of digests
+ */
+extern void fastSqueeze(long times);
+
+
+/**
+ * Squeeze out another digest
+ *
+ * @return The hash sum
*/
-extern char* digest(char* msg, long msglen);
+extern char* squeeze();