链接:http://blog.csdn.net/jbxiaozi/article/details/7351768
---md5与base64
/**
* md5和base64混合加密
* @author mao
*/
private static String md5AndBase64Encode(String userName, String pwd) {
if(userName == null || pwd == null){
return null;
}
String str = "";
try {
MessageDigest md5 = MessageDigest.getInstance("MD5");//md5
md5.update((userName + "+" + pwd).getBytes());
str = new String(Base64.encode(md5.digest()));//base64
//http://blog.csdn.net/jbxiaozi/article/details/7351768
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
return null;
}
return str;
}
---aes128, 256/**
* Java实现AES加密和解密
---sha1
/**
* sh1加密
<