A java implementation creates two different digest for a same input string, if i run as stand alone application or running inside a web application.
The standalone application matches with oracle dbms The implementation is
MessageDigest md5 = MessageDigest.getInstance("MD5");
if (md5 != null) {
md5.reset();
newHashByte = md5.digest(msg.getBytes());
}
newHash = convertToString(newHashByte);
Hex to String conversion implementation is
StringBuffer result = new StringBuffer(64);
for (int i = 0; i < digestBits.length; i++)
hexDigit(result, digestBits[i]);
return result.toString();
Highly appreciate if you could help us resolving this.