private byte[] md5(String strSrc){
byte[] returnByte = null;
try{
MessageDigest md5 = MessageDigest.getInstance("MD5");
returnByte = md5.digest(strSrc.getBytes("UTF8"));
}catch(Exception e){
e.printStackTrace();
}
return returnByte;
}
public String getBase64Encode(byte[] src){
String requestValue="";
try{
BASE64Encoder base64en = new BASE64Encoder();
requestValue = base64en.encode(src);
}catch(Exception e){
e.printStackTrace();
}
return requestValue;
}
posted on 2006-12-22 11:50
ziwolf 阅读(333)
评论(0) 编辑 收藏