This commit is contained in:
Looly 2020-09-16 16:16:37 +08:00
parent 3421a8f54d
commit 355c5c163b

View File

@ -17,6 +17,15 @@ public class AESTest {
Assert.assertEquals("d637735ae9e21ba50cb686b74fab8d2c", encryptHex);
}
@Test
public void encryptTest2() {
String content = "test中文";
AES aes = new AES(Mode.CTS, Padding.PKCS5Padding,
"0CoJUm6Qyw8W8jue".getBytes(), "0102030405060708".getBytes());
final String encryptHex = aes.encryptHex(content);
Assert.assertEquals("8dc9de7f050e86ca2c8261dde56dfec9", encryptHex);
}
@Test
public void encryptPKCS7Test() {
// 构建