aboutsummaryrefslogtreecommitdiffstats
path: root/destroyhashers.c
diff options
context:
space:
mode:
Diffstat (limited to 'destroyhashers.c')
-rw-r--r--destroyhashers.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/destroyhashers.c b/destroyhashers.c
new file mode 100644
index 0000000..0f05c03
--- /dev/null
+++ b/destroyhashers.c
@@ -0,0 +1,12 @@
+/* See LICENSE file for copyright and license details. */
+#include "common.h"
+
+
+void
+destroyhashers(struct algorithm *algorithms, size_t nalgorithms)
+{
+ size_t i;
+ for (i = 0; i < nalgorithms; i++)
+ if (algorithms[i].hasher.destroy)
+ algorithms[i].hasher.destroy(&algorithms[i].hasher);
+}