Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Matching encrypted passwords

by ysth (Canon)
on Dec 26, 2013 at 19:16 UTC ( #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
Node Status?
node history
Node Type: note [id://1068452]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2020-09-20 06:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (119 votes). Check out past polls.

    Notices?