mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
fix test
This commit is contained in:
parent
cb3832bd30
commit
9fec53f8f2
@ -1,5 +1,6 @@
|
||||
package org.dromara.hutool.crypto.asymmetric;
|
||||
|
||||
import org.bouncycastle.jce.spec.IESParameterSpec;
|
||||
import org.dromara.hutool.core.text.StrUtil;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@ -9,15 +10,23 @@ public class ECIESTest {
|
||||
@Test
|
||||
public void eciesTest(){
|
||||
final ECIES ecies = new ECIES();
|
||||
final IESParameterSpec iesParameterSpec = new IESParameterSpec(null, null, 128);
|
||||
ecies.setAlgorithmParameterSpec(iesParameterSpec);
|
||||
|
||||
doTest(ecies, ecies);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void eciesTest2(){
|
||||
final IESParameterSpec iesParameterSpec = new IESParameterSpec(null, null, 128);
|
||||
|
||||
final ECIES ecies = new ECIES();
|
||||
ecies.setAlgorithmParameterSpec(iesParameterSpec);
|
||||
|
||||
final byte[] privateKeyBytes = ecies.getPrivateKey().getEncoded();
|
||||
final ECIES ecies2 = new ECIES(privateKeyBytes, null);
|
||||
ecies2.setAlgorithmParameterSpec(iesParameterSpec);
|
||||
|
||||
|
||||
doTest(ecies, ecies2);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user