/**
* Description 根据键值进行解密
*
* @return
*/
public static String decrypt(String data, String key) throws Exception {
if (data == null)
return null;
BASE64Decoder decoder = new BASE64Decoder();
byte[] buf = decoder.decodeBuffer(data);
byte[] bt = decrypt(buf, format(key));
return new String(bt, "UTF-8");
}
/**
* Description 根据键值进行解密
*
* @return
*/
public static byte[] decrypt2Byte(String data, String key) throws Exception {
if (data == null)
return null;
BASE64Decoder decoder = new BASE64Decoder();
byte[] buf = decoder.decodeBuffer(data);
return decrypt(buf, forma