aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2019-02-10 11:28:30 +0100
committerMattias Andrée <maandree@kth.se>2019-02-10 11:28:30 +0100
commitd84edd9500e6e22ba49c76dc93a7c0731755d008 (patch)
tree5238a0362e0f70ea44fa40906c86102d5a50a4eb /common.h
parentFix warnings (diff)
downloadlibsha2-d84edd9500e6e22ba49c76dc93a7c0731755d008.tar.gz
libsha2-d84edd9500e6e22ba49c76dc93a7c0731755d008.tar.bz2
libsha2-d84edd9500e6e22ba49c76dc93a7c0731755d008.tar.xz
Fix libsha2_digest + minor improvements
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--common.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/common.h b/common.h
index 746cf36..e6e15d5 100644
--- a/common.h
+++ b/common.h
@@ -7,3 +7,15 @@
#include <stddef.h>
#include <string.h>
#include <unistd.h>
+
+
+/**
+ * Process a chunk using SHA-2
+ *
+ * @param state The hashing state
+ * @param chunk The data to process
+ */
+#if defined(__GNUC__)
+__attribute__((__nonnull__, __nothrow__))
+#endif
+void libsha2_process(struct libsha2_state *restrict, const unsigned char *restrict);