简体   繁体   中英

Password hashing compatible with Java and PHP

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

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:

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM