line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Crypt::PBKDF2::Hash::HMACSHA1; |
2
|
|
|
|
|
|
|
# ABSTRACT: HMAC-SHA1 support for Crypt::PBKDF2 using Digest::SHA |
3
|
|
|
|
|
|
|
our $VERSION = '0.160410'; # VERSION |
4
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:ARODLAND'; # AUTHORITY |
5
|
5
|
|
|
5
|
|
2833
|
use Moo 2; |
|
5
|
|
|
|
|
119
|
|
|
5
|
|
|
|
|
31
|
|
6
|
5
|
|
|
5
|
|
1110
|
use strictures 2; |
|
5
|
|
|
|
|
35
|
|
|
5
|
|
|
|
|
212
|
|
7
|
5
|
|
|
5
|
|
930
|
use namespace::autoclean; |
|
5
|
|
|
|
|
6
|
|
|
5
|
|
|
|
|
35
|
|
8
|
5
|
|
|
5
|
|
2181
|
use Digest::SHA (); |
|
5
|
|
|
|
|
10373
|
|
|
5
|
|
|
|
|
134
|
|
9
|
5
|
|
|
5
|
|
25
|
use Carp qw(croak); |
|
5
|
|
|
|
|
7
|
|
|
5
|
|
|
|
|
634
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
with 'Crypt::PBKDF2::Hash'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub hash_len { |
14
|
9012
|
|
|
9012
|
0
|
14883
|
return 20; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub generate { |
18
|
210509
|
|
|
210509
|
0
|
126897
|
my $self = shift; # ($data, $key) |
19
|
210509
|
|
|
|
|
933615
|
return Digest::SHA::hmac_sha1(@_); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub to_algo_string { |
23
|
1001
|
|
|
1001
|
0
|
1303
|
return; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub from_algo_string { |
27
|
0
|
|
|
0
|
0
|
|
croak "No argument expected"; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=pod |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=encoding UTF-8 |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 NAME |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Crypt::PBKDF2::Hash::HMACSHA1 - HMAC-SHA1 support for Crypt::PBKDF2 using Digest::SHA |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 VERSION |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
version 0.160410 |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 DESCRIPTION |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Uses L<Digest::SHA> C<hmac_sha1> to provide the HMAC-SHA1 backend for |
49
|
|
|
|
|
|
|
L<Crypt::PBKDF2>. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 AUTHOR |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Andrew Rodland <arodland@cpan.org> |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
This software is copyright (c) 2016 by Andrew Rodland. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
60
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=cut |