是否有perl模块来验证存储在"{crypt} hashedpassword"中的密码"{ssha} hashedpassword""{md5} hashedpassword"

Syb*_*g78 2 encryption perl crypt

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

  • {}隐窝hashedpassword
  • {SSHA} hashedpasswordsalted
  • {} MD5 hashedpassword
  • .....

是否有一个了解此方案的perl模块,并且能够在给定明文密码的情况下验证密码?

就像是

打印"success !! \n"如果validatePassword("helloworld",{CRYPT} r2sKInajXZ6Fk)

谢谢.

cjm*_*cjm 6

Authen :: Passphrase可以这样做:

use Authen::Passphrase;

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