Looly 5 年 前
コミット
355c5c163b

+ 9 - 0
hutool-crypto/src/test/java/cn/hutool/crypto/test/symmetric/AESTest.java

@@ -18,6 +18,15 @@ public class AESTest {
 	}
 
 	@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() {
 		// 构建
 		AES aes = new AES(Mode.CBC.name(), "pkcs7padding",