Crypt-Passphrase
view release on metacpan or search on metacpan
xt/author/with-dependencies.t view on Meta::CPAN
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 1.382 second using v1.01-cache-2.11-cpan-acf6aa7dc9e )