public class MD {
public static String compute(String inStr) {
try {
MessageDigest md = MessageDigestgetInstance(MD);
byte[] byteArray = inStrgetBytes(UTF);
byte[] mdBytes = mddigest(byteArray);
StringBuffer hexValue = new StringBuffer();
for (int i = ; i < mdByteslength; i++) {
int val = ((int) mdBytes[i]) & xff;
if (val < ) {
hexValueappend();
}
hexValueappend(IntegertoHexString(val));
}
return hexValuetoString();
} catch (Exception e) {
return ;
}
}