Tutorial :Java implementation of crypt(3)? [closed]



Question:

Could someone point me in the direction of a crypt(3) library for java? One that generates results similar to PHP. e.g.

james => $1$uAjE75CY$XVIp.DpCuwQTG60h.r5er/

Thanks

Update:

The password above is separated by $. The 1 represents MD5 (variation). The next token represents the salt used for the hash and the last token represents the MD5 hash. This hash is a variation from MD5 algorithm.


Solution:1

Try this one,

https://github.com/jonabbey/Ganymede/blob/master/src/ganymede/arlut/csd/crypto/MD5Crypt.java

I was able to use it to compare password generated by PHP crypt.

Please notice that this class uses its own MD5 class.


Solution:2

"java crypt" gives several candidates at Google.


Solution:3

Apache commons codec contains two clasees for Crypt3

  • org.apache.commons.codec.digest.Crypt
  • org.apache.commons.codec.digest.Md5Crypt

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »