Crypt Alternative ()

I am working on a script and you need to save passwords. For development purposes, I used the function crypt()because it was simple and accessible. Now that I'm basically done, I want to replace it with something a little better and more consistent.

Some of my problems are:

  • not all algorithms are supported in every system
  • sometimes salt is pre-tied to the result (it seems like a security issue)

I want something that works with PHP 4.3+.

Is there anything available or should I stick with it crypt()? I was thinking about using md5(md5($password).$salt). Thank you for understanding.

+5
source share
2 answers

There is nothing wrong with crypt

If your server does not support it, use a different server.

MD5 ( SHA1, )

bcrypt ( blowfish crypt), pbkdf2

​​ pbkdf2: PHP RSA PBKDF2

, :

+6

: . - , pw.

: , , . PHP 5.3 PHP, Blowfish, .

+4

All Articles