aboutsummaryrefslogtreecommitdiffhomepage
path: root/pyecsca/codegen/hash/sha2.c
diff options
context:
space:
mode:
Diffstat (limited to 'pyecsca/codegen/hash/sha2.c')
-rw-r--r--pyecsca/codegen/hash/sha2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pyecsca/codegen/hash/sha2.c b/pyecsca/codegen/hash/sha2.c
index d2ddf6f..2b7f11d 100644
--- a/pyecsca/codegen/hash/sha2.c
+++ b/pyecsca/codegen/hash/sha2.c
@@ -334,4 +334,8 @@ void hash_final(void* ctx, int size, const uint8_t* msg, uint8_t* digest) {
}
sha2_lastBlock(ctx, msg, length_b);
sha2_ctx2hash(digest, ctx);
+}
+
+void hash_free_ctx(void *ctx) {
+ free(ctx);
} \ No newline at end of file