Password hashing compatible with Java and PHP

2020-03-03 06:39发布

Is there a secure password hashing library (e.g. phpass) or hashing method that I can easily use in both PHP and Java?

3条回答
\"骚年 ilove
2楼-- · 2020-03-03 06:55

If you want do the easy thing, you can use sha-N with salt. (N being 1, 256 or 512)


Jeff Atwood did a nice blog post on that recently, saying that bcrypt and PBKDF2 are the best options.

In PHP you can use bcrypt (and in Java too)


Related topics:

Resouces:

查看更多
劳资没心,怎么记你
3楼-- · 2020-03-03 07:03

Any standard library such as SHA*, MD* will do. SHA>2 is recommended (e.g. SHA512).

查看更多
贪生不怕死
4楼-- · 2020-03-03 07:15

md5 and SHA with salt are the most widely used ones.

查看更多
登录 后发表回答