Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: [blogs.perl.org credential release] How can I check the password that I used on blogs.perl.org

by three18ti (Scribe)
on Jan 23, 2014 at 12:15 UTC ( #1071734=note: print w/ replies, xml ) Need Help??


in reply to Re: [blogs.perl.org credential release] How can I check the password that I used on blogs.perl.org
in thread [SOLVED][blogs.perl.org credential release] How can I check the password that I used on blogs.perl.org

Thanks Anonymous Monk. The best part, it's even spelled out in the Doc, but I didn't understand when I first read it.

When verifying an existing digest string you should use the digest as the salt (like crypt($plain, $digest) eq $digest ). The SALT used to create the digest is visible as part of the digest. This ensures crypt() will hash the new string with the same salt as the digest. This allows your code to work with the standard crypt and with more exotic implementations. In other words, assume nothing about the returned string itself nor about how many bytes of SALT may matter.


Comment on Re^2: [blogs.perl.org credential release] How can I check the password that I used on blogs.perl.org
Re^3: [blogs.perl.org credential release] How can I check the password that I used on blogs.perl.org
by Anonymous Monk on Jan 23, 2014 at 12:31 UTC

    Only first 2 characters of a string are used as salt by crypt ...

    perl -e '$start = q[px]; print crypt( "polka" , $_ ) . "\n" for map $ +start. $_ , '' , q[a] .. q[x] , 0 .. 9' \ | uniq pxtbCUVxSeD2A

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1071734]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (18)
As of 2014-08-01 13:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (20 votes), past polls