mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-03 16:24:31 +08:00
add test
This commit is contained in:
parent
313cadbdfa
commit
b409d76899
@ -8,6 +8,7 @@ import cn.hutool.crypto.ECKeyUtil;
|
||||
import cn.hutool.crypto.KeyUtil;
|
||||
import cn.hutool.crypto.SecureUtil;
|
||||
import cn.hutool.crypto.SmUtil;
|
||||
import org.bouncycastle.crypto.DataLengthException;
|
||||
import org.bouncycastle.crypto.engines.SM2Engine;
|
||||
import org.bouncycastle.crypto.params.ECPrivateKeyParameters;
|
||||
import org.bouncycastle.jcajce.spec.OpenSSHPrivateKeySpec;
|
||||
@ -336,4 +337,11 @@ public class SM2Test {
|
||||
String publicKey = "04bf347dfa32b9bc4c378232898ea43a210887a9b9ed6cc188f91b653706b44fa8434518d54412606788f34be8097cc233608f780edaf695c7e2b1d1c1b7b0d7c3";
|
||||
new SM2(null, publicKey);
|
||||
}
|
||||
|
||||
@Test(expected = DataLengthException.class)
|
||||
public void issueIA824PTest() {
|
||||
SM2 sm2 = SmUtil.sm2();
|
||||
String emptyStr = "";
|
||||
sm2.encryptHex(emptyStr, KeyType.PublicKey);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user