5

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

jSherz
  • 927
  • 4
  • 14
  • 33

3 Answers3

7

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:

Community
  • 1
  • 1
Colin Hebert
  • 91,525
  • 15
  • 160
  • 151
2

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

j13r
  • 2,576
  • 2
  • 21
  • 28
0

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

Anurag Ramdasan
  • 4,189
  • 4
  • 31
  • 53