赞
踩
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
byte[] dataEncript = "xxx".getBytes("UTF-8");
//base64 加密
String encriptStr = new BASE64Encoder().encode(dataEncript);
//base64 解密
byte[] decriptByte = new BASE64Decoder().decodeBuffer(encriptStr);
String dataStr = new String(decriptByte, "UTF-8");
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。