This commit is contained in:
Looly
2022-09-15 22:05:09 +08:00
parent 6d3d7d4913
commit a211d6eada
2 changed files with 20 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
package cn.hutool.crypto.symmetric;
import cn.hutool.crypto.Padding;
import org.junit.Assert;
import org.junit.Test;
public class Issue2613Test {
@Test
public void aesGcmTest(){
final AES aes = new AES("GCM", Padding.NoPadding.name(),
"1234567890123456".getBytes(),
"1234567890123456".getBytes());
final String encryptHex = aes.encryptHex("123456");
final String s = aes.decryptStr(encryptHex);
Assert.assertEquals("123456", s);
}
}