是否有一个perl模块来验证存储在“{crypt} hashedpassword”中的密码" {SSHA} hashedpassword" " {MD5} hashedpassword" [英] Is there a perl module to validate passwords stored in "{crypt}hashedpassword" "{ssha}hashedpassword" "{md5}hashedpassword"

查看:193
本文介绍了是否有一个perl模块来验证存储在“{crypt} hashedpassword”中的密码" {SSHA} hashedpassword" " {MD5} hashedpassword"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表格存储用户登录信息,其中包含以下方案中的密码。

I have a table which stores user login infomration, which contains passwords in the below scheme


  • {crypt} hashedpassword

  • {ssha} hashedpasswordsalted

  • {md5} hashedpassword

  • .....

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

是否有一个 perl模块了解此方案,并能够验证密码给出明文密码?

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

如果有效的密码(helloworld),{@ p

Something like


打印success !! \\\

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

谢谢。

推荐答案

Authen :: Passphrase 可以这样做:

use Authen::Passphrase;

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

这篇关于是否有一个perl模块来验证存储在“{crypt} hashedpassword”中的密码" {SSHA} hashedpassword" " {MD5} hashedpassword"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆