aboutsummaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-02-11 09:47:07 +0100
committerMattias Andrée <maandree@operamail.com>2014-02-11 09:47:14 +0100
commitfcd949ca7895a3b35dab57ee8e5b793dbe47d4f1 (patch)
treedc756ab30d7978caca660ba275b0bba11db70e07 /c
parentc version: make with WITH_WIPE=yes to wipe the state and message buffer before freeing (diff)
downloadsha3sum-fcd949ca7895a3b35dab57ee8e5b793dbe47d4f1.tar.gz
sha3sum-fcd949ca7895a3b35dab57ee8e5b793dbe47d4f1.tar.bz2
sha3sum-fcd949ca7895a3b35dab57ee8e5b793dbe47d4f1.tar.xz
c version: make the state accessible
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'c')
-rw-r--r--c/sha3.c11
-rw-r--r--c/sha3.h8
2 files changed, 19 insertions, 0 deletions
diff --git a/c/sha3.c b/c/sha3.c
index 5ac3144..6c35267 100644
--- a/c/sha3.c
+++ b/c/sha3.c
@@ -842,3 +842,14 @@ extern byte* sha3_squeeze(void)
return rc;
}
+
+/**
+ * Retrieve the state of the Keccak sponge
+ *
+ * @return A 25-element array with the state, changes will be applied to the sponge
+ */
+extern llong* sha3_state(void)
+{
+ return S;
+}
+
diff --git a/c/sha3.h b/c/sha3.h
index 950ef1e..99cd209 100644
--- a/c/sha3.h
+++ b/c/sha3.h
@@ -98,3 +98,11 @@ extern void sha3_fastSqueeze(long times);
*/
extern byte* sha3_squeeze(void);
+
+/**
+ * Retrieve the state of the Keccak sponge
+ *
+ * @return A 25-element array with the state, changes will be applied to the sponge
+ */
+extern llong* sha3_state(void);
+