mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix getD
This commit is contained in:
@@ -311,4 +311,14 @@ public class SM2Test {
|
||||
byte[] dec = sm2.decrypt(data, KeyType.PrivateKey);
|
||||
Assert.assertArrayEquals(dec, src.getBytes(StandardCharsets.UTF_8));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void dLengthTest(){
|
||||
final SM2 sm2 = SmUtil.sm2();
|
||||
Assert.assertEquals(64, sm2.getDHex().length());
|
||||
Assert.assertEquals(32, sm2.getD().length);
|
||||
|
||||
// 04占位一个字节
|
||||
Assert.assertEquals(65, sm2.getQ(false).length);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user