Anand Murugan
Anand Murugan

Reputation: 857

Inconsistent Result in DigestUtils.md5(String data) Method for the Same String

Hi In My application I need to calcluate the md5 Hash Value for a string value... for that I have called DigestUtils.md5Hex(String string) method... But it is not produced same result always for a same string... The result is inconsistent. In that md5Hex() method internally md5(string) called. That method returns the different byteArray values for a same string. I am not able to get what exactly happening? Please clarify the issue...

Upvotes: 2

Views: 1476

Answers (1)

Bozho
Bozho

Reputation: 597076

As you can guess, this is not possible. You are probably passing different strings, but you don't know it. They may differ by a whitespace, for example, or some invisible character.

Upvotes: 2

Related Questions