File Coverage

blib/lib/Crypt/Password/StretchedHash/HashInfo.pm
Criterion Covered Total %
statement 21 21 100.0
branch n/a
condition n/a
subroutine 9 9 100.0
pod 7 7 100.0
total 37 37 100.0


line stmt bran cond sub pod time code
1             package Crypt::Password::StretchedHash::HashInfo;
2              
3 3     3   95596 use strict;
  3         11  
  3         116  
4 3     3   30 use warnings;
  3         5  
  3         1191  
5              
6             sub new {
7 5     5 1 3765 my $class = shift;
8 5         20 my $self = bless {}, $class;
9 5         17 return $self;
10             }
11              
12             sub delimiter {
13 1     1 1 9 my $self = shift;
14 1         15 die "This is abstract method. You have to return delimiter string.";
15             }
16              
17             sub identifier {
18 1     1 1 483 my $self = shift;
19 1         9 die "This is abstract method. You have to return identifier of your HashInfo.";
20             }
21              
22             sub hash {
23 1     1 1 372 my $self = shift;
24 1         8 die "This is abstract method. You have to return Digest::SHA or Digest::SHA3 object.";
25             }
26              
27             sub salt {
28 1     1 1 304 my $self = shift;
29 1         8 die "This is abstract method. This is called at the time of first crypt. You have to return randomized salt string for each users.";
30             }
31              
32             sub stretch_count {
33 1     1 1 454 my $self = shift;
34 1         7 die "This is abstract method. You have to return stretch count.";
35             }
36              
37             sub format {
38 1     1 1 328 my $self = shift;
39 1         7 die "This is abstract method. You have to return format for hashed password representation.";
40             }
41              
42             1;
43              
44             __END__