JAVA实现:
public static String getMD5(String str) throws Exception {
MessageDigest md5 = MessageDigest.getInstance("MD5"); BASE64Encoder base64en = new BASE64Encoder(); String newStr = base64en.encode(md5.digest(str.getBytes())); return newStr;
}
Oracle实现:
select utl_raw.cast_to_varchar2(utl_encode.base64_encode(MD5(str))) from dual;