This commit is contained in:
Looly 2020-09-15 22:27:57 +08:00
parent b2e1b903ab
commit 31c211c096
2 changed files with 10 additions and 0 deletions

View File

@ -3,6 +3,7 @@ package cn.hutool.core.date;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.BetweenFormater.Level;
import cn.hutool.core.date.format.FastDateFormat;
import cn.hutool.core.lang.Console;
import org.junit.Assert;
import org.junit.Test;

View File

@ -17,4 +17,13 @@ public class AESTest {
Assert.assertEquals("d637735ae9e21ba50cb686b74fab8d2c", encryptHex);
}
@Test
public void encryptPKCS7Test() {
// 构建
AES aes = new AES(Mode.CBC.name(), "pkcs7padding",
"1234567890123456".getBytes(), "1234567890123456".getBytes());
String encryptHex = aes.encryptHex("123456");
Assert.assertEquals("d637735ae9e21ba50cb686b74fab8d2c", encryptHex);
}
}