MD5Encoder

package com.timespark.core.util;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class MD5Encoder {
	 public static String encode(String pwd) {  
	        try {  
	            MessageDigest  digest = MessageDigest.getInstance("MD5");  
	            byte[]  bytes = digest.digest(pwd.getBytes());  
	            StringBuffer sb = new  StringBuffer();  
	            for(int i = 0;i

 

你可能感兴趣的:(Java)