![]() |
|
good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: What's the idea of different salts in crypt()?by oneiros (Scribe) |
on Sep 20, 2001 at 10:36 UTC ( #113536=note: print w/replies, xml ) | Need Help?? |
Right. Knowing the salt is half the battle in cracking the password. In addition to the suggestions of our fellow monks, I can add two more points. Use a random salt and store the password in such a way where it will be extremely difficult for someone to obtain. Such as a configuration file only readable by the application itself. Some example code follows:
Another thing you can do is use the first two characters of the password as the salt, then strip those two characters off before you store it.
In Section
Seekers of Perl Wisdom
|
|