开发者

Is there a perl module to validate passwords stored in "{crypt}hashedpassword" "{ssha}hashedpassword" "{md5}hashedpassword"

开发者 https://www.devze.com 2023-03-01 01:14 出处:网络
I have a table which stores user login infomration, which contains passwords in the bel开发者_开发问答ow scheme

I have a table which stores user login infomration, which contains passwords in the bel开发者_开发问答ow scheme

  • {crypt}hashedpassword
  • {ssha}hashedpasswordsalted
  • {md5}hashedpassword
  • .....

Is there a perl module that understands this scheme and is able to validate the password given the plain text password ?

Something like

print "success!!\n" if validatePassword("helloworld",{CRYPT}r2sKInajXZ6Fk)

Thanks.


Authen::Passphrase can do this:

use Authen::Passphrase;

print "success!!\n" 
  if Authen::Passphrase->from_rfc2307('{CRYPT}r2sKInajXZ6Fk')->match("helloworld");
0

精彩评论

暂无评论...
验证码 换一张
取 消