/**
* md5加密
* @param str
* @return the base 64 hashed string or null if MD5 is not available
*/
public static String hashMD5String(String empid,String str){
String tmp = null;
try{
MessageDigest md = MessageDigest.getInstance("DES");
md.update(empid.getBytes());
byte[] byteTmpe = md.digest(str.getBytes());
BASE64Encoder b64encoder = new BASE64Encoder();
tmp = b64encoder.encode(byteTmpe);
}catch(Exception e){
}
return tmp;
}
MD5用户口令加密
最新推荐文章于 2024-04-24 11:21:41 发布