Here you can find the source of md5raw(String data)
public static byte[] md5raw(String data)
//package com.java2s; /******************************************************************************* * Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) * Copyright (c) 2011- kotemaru@kotemaru.org ******************************************************************************/ import java.security.MessageDigest; public class Main { private final static String MD = "MD5"; private final static String UTF8 = "UTF-8"; public static byte[] md5raw(String data) { try {//from w w w. ja v a 2 s . c o m MessageDigest md = MessageDigest.getInstance(MD); md.update(data.getBytes(UTF8)); return md.digest(); } catch (Exception e) { throw new RuntimeException(e); } } }