aboutsummaryrefslogtreecommitdiff
path: root/src/sha.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/sha.zig')
-rw-r--r--src/sha.zig5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sha.zig b/src/sha.zig
index 64539eff0..cd9fd0f0a 100644
--- a/src/sha.zig
+++ b/src/sha.zig
@@ -74,6 +74,10 @@ fn NewEVP(
pub fn final(this: *@This(), out: *Digest) void {
std.debug.assert(BoringSSL.EVP_DigestFinal(&this.ctx, out, null) == 1);
}
+
+ pub fn deinit(this: *@This()) void {
+ _ = BoringSSL.EVP_MD_CTX_cleanup(&this.ctx);
+ }
};
}
pub const EVP = struct {
@@ -331,4 +335,3 @@ pub fn main() anyerror!void {
// std.crypto.hash.sha2.Sha256.hash(value, &hash2, .{});
// try std.testing.expectEqual(hash, hash2);
// }
-