Commit 52283ebe by shuai

删除了加密算法

parent 6435f65a
package com.offcn.TestUnti;
import com.puhui.aes.AesEncryptionUtil;
import org.apache.commons.lang3.StringUtils;
/**
* 加密和解密
*
* @author wangcj
*/
public class EncryptionUtil {
private static final String prefix = "xy";
private EncryptionUtil() {
}
/**
* 加密
*
* @author wangcj
* @param content
* @return
*/
public static String encrypt(String content) {
String tempContent = content;
if (StringUtils.isBlank(tempContent)) {
return tempContent;
}
if (tempContent.startsWith(prefix)) {
return tempContent;
}
return AesEncryptionUtil.encrypt(tempContent);
}
/**
* 解密
*
* @author wangcj
* @param content
* @return
*/
public static String decrypt(String content) {
String tempContent = content;
if (StringUtils.isBlank(tempContent)) {
return tempContent;
}
if (tempContent.startsWith(prefix)) {
return AesEncryptionUtil.decrypt(tempContent);
}
return tempContent;
}
public static void main(String[] args) {
String s1=EncryptionUtil.encrypt("18230065651");
String s=EncryptionUtil.decrypt("e10adc3949ba59abbe56e057f20f883e");
System.out.println("加密后,卡号是:"+s1);
System.out.println("解密后,卡号是:"+s);
}
}
\ No newline at end of file
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