|
|
| P is for Practical | |
| PerlMonks |
Re: Mention password in the script -encrypted formby Random_Walk (Parson) |
| on Feb 19, 2009 at 14:25 UTC ( #745058=note: print w/ replies, xml ) | Need Help?? |
|
Do you need to decrypt this password again or check that a user knows this password ? If you need to decrypt it again in the script it will only be obfuscated and anyone with enough Perl knowledge will be able to decrypt it too. if you just need to check a user knows it you can store a hash of the password (MD5 hash should do the trick) and then compare a hash of the user attempt. To make this a little more secure you should mix the password with a salt before hashing it. This stops making a dictionary of many password hashes and then seeing if yours is already know. The salt can be stored clear along with the password hash. Update, code added
Cheers,
Pereant, qui ante nos nostra dixerunt!
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||