packetstormer has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks
I wonder would anyone be able to help me get my head around Authen::Passphrase::SaltedDigest. I am having trouble with the concept more than anything else.
I need to store hashed passphrases in a MySQL database to increase the security. I have chosen Authen::Passphrase::SaltedDigest but not too sure if I am implementing it correctly. Specifically, I am confused about the salt. If I generated a hash as follows:I then get a hashed string in $ppr as follows:.... $ppr = Authen::Passphrase::SaltedDigest->new( algorithm => "SHA-1", salt_random => 20, passphrase => "passphrase"); ....
So, I take it I store this value in the database, is that correct?$hash = $ppr->hash;
I thought I might have to run the inputted passphrase AND the same salt value through the algorithm to come up with the same hash??
Sorry for the dumb question but can anyone help?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SaltedDigest Salt?
by BrowserUk (Patriarch) on Feb 07, 2012 at 20:54 UTC | |
by afoken (Chancellor) on Feb 08, 2012 at 11:19 UTC | |
by BrowserUk (Patriarch) on Feb 08, 2012 at 12:00 UTC | |
by packetstormer (Monk) on Feb 08, 2012 at 12:42 UTC | |
by BrowserUk (Patriarch) on Feb 08, 2012 at 13:13 UTC | |
by zwon (Abbot) on Feb 08, 2012 at 13:21 UTC | |
by BrowserUk (Patriarch) on Feb 08, 2012 at 13:51 UTC | |
by zwon (Abbot) on Feb 08, 2012 at 14:58 UTC | |
by BrowserUk (Patriarch) on Feb 08, 2012 at 18:45 UTC | |
|