Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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

Replies are listed 'Best First'.
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?
[Corion]: ambrus: He isn't familiar with GIGO (or nIGO) yet?
[Corion]: Also, is it impossible in the general case, but doable in your specific case, maybe? I find that working through a counterexample usually makes people see the light
[Corion]: Uiiih! Let's Encrypt will start issuing wildcard certificates, that's cool!

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2017-12-12 13:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (332 votes). Check out past polls.

    Notices?