java中使用MD5对数据密码加密计算机等级考试
文章作者 100test 发表时间 2010:01:01 12:26:06
来源 100Test.Com百考试题网
    
  public class MD5 {
  public static String compute(String inStr) {
  try {
  MessageDigest md5 = MessageDigest.getInstance("MD5").
  byte[] byteArray = inStr.getBytes("UTF-8").
  byte[] md5Bytes = md5.digest(byteArray).
  StringBuffer hexValue = new StringBuffer(32).
  for (int i = 0. i