Java equivalence to php hash

32 Views Asked by At

I am trying to get a api working in java, but I am having a hard time trying to get the hash for the password correct. In PHP this works - hash('sha256', md5("password")) - what is the java equivalence to that? I have tried DigestUtils.sha256Hex(DigestUtils.md5("password")) but it does not result in the same hash.

Thanks!

1

There are 1 best solutions below

0
Jeremy On

Never mind, I got it. I had to use DigestUtils.md5Hex not DigestUtils.md5