Crypt-Passphrase
view release on metacpan or search on metacpan
xt/author/with-dependencies.t view on Meta::CPAN
my $hash4 = argon2id_pass($password, $salt, 2, '8M', 1, 16);
ok($passphrase->verify_password($password, $hash4), 'Can verify reduced memory cost hash');
ok($passphrase->needs_rehash($hash4), 'Reduced memory cost hash needs rehash');
my $hash5 = bcrypt($password, '2b', 10, $salt);
ok($passphrase->verify_password($password, $hash5), 'Can verify bcrypt hash');
ok($passphrase->needs_rehash($hash5), 'bcrypt hash needs rehash');
my $hash6 = encode_base64($password);
ok($passphrase->verify_password($password, $hash6), 'Can verify backup "hash"');
ok($passphrase->needs_rehash($hash6), 'Backup hash needs rehash');
my $hash7 = '$1$3azHgidD$SrJPt7B.9rekpmwJwtON31';
ok(!$passphrase->verify_password($password, $hash7), 'Can\'t verify md5 crypt');
ok(!$passphrase->verify_password($password, '*'), '* fails to verify');
done_testing;
( run in 0.868 second using v1.01-cache-2.11-cpan-87723dcf8b7 )