From 42d6771c97af6dfe0020c8a9bb4c8103162bfb5e Mon Sep 17 00:00:00 2001 From: John Jiang Date: Wed, 27 Sep 2023 15:30:19 +0800 Subject: [PATCH] TKSS-414: SM4Test should not depend on SM2 --- .../test/java/com/tencent/kona/crypto/provider/SM4Test.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kona-crypto/src/test/java/com/tencent/kona/crypto/provider/SM4Test.java b/kona-crypto/src/test/java/com/tencent/kona/crypto/provider/SM4Test.java index 11e90380..6d2148d4 100644 --- a/kona-crypto/src/test/java/com/tencent/kona/crypto/provider/SM4Test.java +++ b/kona-crypto/src/test/java/com/tencent/kona/crypto/provider/SM4Test.java @@ -843,7 +843,7 @@ private void testKeyWrapping(String algorithm) throws Exception { @Test public void testSealedObject() throws Exception { KeyPairGenerator keyPairGen - = KeyPairGenerator.getInstance("SM2", PROVIDER); + = KeyPairGenerator.getInstance("EC", PROVIDER); keyPairGen.initialize(256); KeyPair keyPair = keyPairGen.generateKeyPair(); @@ -855,7 +855,7 @@ public void testSealedObject() throws Exception { Cipher cipher = Cipher.getInstance("SM4/CBC/PKCS7Padding", PROVIDER); cipher.init(Cipher.ENCRYPT_MODE, secretKey); - // Seal the SM2 private key + // Seal the private key SealedObject sealed = new SealedObject(keyPair.getPrivate(), cipher); // Serialize