There was an error while loading. Please reload this page.
1 parent 709fdc2 commit 7055f17Copy full SHA for 7055f17
1 file changed
src/main/java/org/gmssl/Sm3.java
@@ -9,7 +9,7 @@
9
10
package org.gmssl;
11
12
-public class Sm3 {
+public class Sm3 implements AutoCloseable{
13
14
public final static int DIGEST_SIZE = GmSSLJNI.SM3_DIGEST_SIZE;
15
@@ -57,4 +57,9 @@ public byte[] digest() {
57
}
58
return dgst;
59
60
+
61
+ @Override
62
+ public void close() throws Exception {
63
+ GmSSLJNI.sm3_ctx_free(sm3_ctx);
64
+ }
65
0 commit comments