package sf_md
import java
import java
//import java
//import java
public class MD
private String inStr;
private MessageDigest mad
public MD
this
try{
this
}
catch(Exception e){
System
e
}
}
public String compute(){
char[] charArray=this
byte[] byteArray=new byte[charArray
for(int i=
byteArray[i]=(byte)charArray[i];
byte[] md
StringBuffer hexValue=new StringBuffer();
for(int i=
int val=((int)md
if(val<
hexValue
hexValue
}
return hexValue
}
public static void main(String[] args) {
String string=null;
try{
System
BufferedReader br=new BufferedReader(new InputStreamReader(System
string=br
}
catch(IOException e){
System
}
MD
String postString =pute();
System
}
}
From:http://tw.wingwit.com/Article/program/Java/hx/201311/25613.html