base64
String str = "java12345";
String ret = null;
ret = new BASE64Encoder().encode(str.getBytes());
System.out.println("加密前:" + str + " 加密后:" + ret);
str = "amF2YTEyMzQ1";
try {
ret = new String(new BASE64Decoder().decodeBuffer(str));
} catch (IOException e) {
e.printStackTrace();
}
System.out.println("解密前:" + str + " 解密后:" + ret);
}
}