Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Matching encrypted passwords

by ysth (Canon)
on Dec 26, 2013 at 19:16 UTC ( [id://1068452]=note: print w/replies, xml ) Need Help??


in reply to Matching encrypted passwords

Don't pass the algorithm either, since that will also be parsed; if you pass one it is ignored. (Well, actually it tries to validate it but then ignores the validation failure in case it's an algorithm the module doesn't know about, and then later ignores it anyway since you specified a salt.)
use Crypt::Password 'password'; my $password = 'abc'; my $crypt = '$1$Wl2RANfv$M9PjezS//sUMDRnhhO5vR1'; print "Password matches\n" if password( $password, $crypt ) eq $crypt;
--
A math joke: r = | |csc(θ)|+|sec(θ)| |-| |csc(θ)|-|sec(θ)| |

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-03-19 05:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found