diff options
author | Mattias Andrée <maandree@operamail.com> | 2013-06-16 23:48:26 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2013-06-16 23:48:26 +0200 |
commit | 42c0197d1858200b09d4e0523b44dc1e150cb2df (patch) | |
tree | d5f4215ca3716abde3b9f949dbb6053d6ed6bb80 /c/sha3.h | |
parent | m (diff) | |
download | sha3sum-42c0197d1858200b09d4e0523b44dc1e150cb2df.tar.gz sha3sum-42c0197d1858200b09d4e0523b44dc1e150cb2df.tar.bz2 sha3sum-42c0197d1858200b09d4e0523b44dc1e150cb2df.tar.xz |
misc
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | c/sha3.h | 32 |
1 files changed, 29 insertions, 3 deletions
@@ -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(); |