WangHan
2024-09-12 d5855a4926926698b740bc6c7ba489de47adb68b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package tech.powerjob.server.common.utils;
 
import org.junit.jupiter.api.Test;
 
/**
 * AESUtilTest
 *
 * @author tjq
 * @since 2024/8/10
 */
class AESUtilTest {
 
    @Test
    void testAes() throws Exception {
 
        String sk = "ChinaNo.1_ChinaNo.1_ChinaNo.1";
 
        String txt = "kyksjdfh";
 
        String encrypt = AESUtil.encrypt(txt, sk);
        System.out.println(encrypt);
        String decrypt = AESUtil.decrypt(encrypt, sk);
        System.out.println(decrypt);
 
        assert txt.equals(decrypt);
    }
 
}