Java实现的crypt(3)? [英] Java implementation of crypt(3)?
问题描述
james => $ 1 $ uAjE75CY $ XVIp.DpCuwQTG60h.r5er
/
谢谢
更新:
上面的密码由$分隔。 1代表MD5(变异)。下一个标记表示用于散列的盐,最后一个标记表示MD5散列。这个散列是MD5算法的一个变体。
尝试这个,
我能够使用它比较PHP crypt生成的密码。
请注意,此课程使用自己的MD5课程。
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.
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.
这篇关于Java实现的crypt(3)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!