Commit 4cc66ac4 by 李传峰

加入AES加密工具类

parent 5015ad4c
package com.pcloud.common.utils;
import com.pcloud.common.utils.encrypt.AESUtil;
import org.junit.Assert;
import org.junit.Test;
public class AESUtilTest {
@Test
public void testAll() {
exec("!@#$%^");
exec("abcdefg");
exec("123456");
exec("123456efg");
exec("我是中国人");
}
private void exec(String src) {
String e = AESUtil.fixedEncrypt(src);
String d = AESUtil.fixedDecrypt(e);
Assert.assertEquals(d, src);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment