展开全部
package com.palic.pss.afcs.worldthrough.common.util;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
import repack.com.thoughtworks.xstream.core.util.Base64Encoder;
/**
* AES加密解密
* @author EX-CHENQI004
*
*/
public class AesUtils {
public static final String cKey= "assistant7654321";
/**
* 加密--把加密后的byte数组先进行62616964757a686964616fe58685e5aeb931333335313838二进制转16进制在进行base64编码
* @param sSrc
* @param sKey
* @return
* @throws Exception
*/
public static String encrypt(String sSrc, String sKey) throws Exception {
if (sKey == null) {
throw new IllegalArgumentException("Argument sKey is null.");
}
if (sKey.length() != 16) {
throw new IllegalA