aboutsummaryrefslogtreecommitdiffstats
path: root/state_output_size.c
diff options
context:
space:
mode:
Diffstat (limited to 'state_output_size.c')
-rw-r--r--state_output_size.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/state_output_size.c b/state_output_size.c
new file mode 100644
index 0000000..d2cc5c1
--- /dev/null
+++ b/state_output_size.c
@@ -0,0 +1,15 @@
+/* See LICENSE file for copyright and license details. */
+#include "common.h"
+
+
+/**
+ * Get the output size of the algorithm specified for a state
+ *
+ * @parma state The state
+ * @return The number of bytes in the output, zero on error
+ */
+size_t
+libsha2_state_output_size(const struct libsha2_state *restrict state)
+{
+ return libsha2_algorithm_output_size(state->algorithm);
+}