File Coverage

blib/lib/Crypt/Passphrase/PassphraseHash.pm
Criterion Covered Total %
statement 6 14 42.8
branch n/a
condition n/a
subroutine 2 6 33.3
pod 4 4 100.0
total 12 24 50.0


line stmt bran cond sub pod time code
1             package Crypt::Passphrase::PassphraseHash;
2             $Crypt::Passphrase::PassphraseHash::VERSION = '0.021';
3 1     1   159498 use strict;
  1         3  
  1         46  
4 1     1   6 use warnings;
  1         2  
  1         335  
5              
6             sub new {
7 0     0 1   my ($class, $validator, $raw_hash) = @_;
8              
9 0           return bless {
10             validator => $validator,
11             raw_hash => $raw_hash,
12             }, $class;
13             }
14              
15             sub verify_password {
16 0     0 1   my ($self, $password) = @_;
17 0           return $self->{validator}->verify_password($password, $self->{raw_hash});
18             }
19              
20             sub needs_rehash {
21 0     0 1   my $self = shift;
22 0           return $self->{validator}->needs_rehash($self->{raw_hash});
23             }
24              
25             sub raw_hash {
26 0     0 1   my $self = shift;
27 0           return $self->{raw_hash};
28             }
29              
30             1;
31              
32             # ABSTRACT: An object representing a hash for password checking
33              
34             __END__