mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add test
This commit is contained in:
@@ -19,9 +19,7 @@ package org.dromara.hutool.crypto.symmetric;
|
||||
import org.dromara.hutool.core.codec.binary.Base64;
|
||||
import org.dromara.hutool.core.codec.binary.HexUtil;
|
||||
import org.dromara.hutool.core.util.RandomUtil;
|
||||
import org.dromara.hutool.crypto.KeyUtil;
|
||||
import org.dromara.hutool.crypto.Mode;
|
||||
import org.dromara.hutool.crypto.Padding;
|
||||
import org.dromara.hutool.crypto.*;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@@ -148,4 +146,10 @@ public class AESTest {
|
||||
final String decryptStr = aes.decryptStr(encrypt);
|
||||
Assertions.assertEquals(phone, decryptStr);
|
||||
}
|
||||
|
||||
@Test
|
||||
void issue3766Test() {
|
||||
Assertions.assertThrows(CryptoException.class, ()->
|
||||
SecureUtil.aes("8888888888888888".getBytes()).decryptStr("哈哈"));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user