jSherz
jSherz

Reputation: 927

Password hashing compatible with Java and PHP

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

Upvotes: 5

Views: 3296

Answers (3)

Colin Hebert
Colin Hebert

Reputation: 93177

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:

Upvotes: 7

Anurag Ramdasan
Anurag Ramdasan

Reputation: 4340

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

Upvotes: 0

j13r
j13r

Reputation: 2671

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

Upvotes: 2

Related Questions