HMAC_SHA1.pm

filter: Statementstmt 95.6% 22 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod 0.0% 0 / 3 totaltotal 84.8% 28 / 33 CC 1 SCAR 1.3
CC
1
Cov
96%
hmac_sha1_hex
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« HMAC_MD5.pm ↑ Summary
1 package Digest::HMAC_SHA1;
2 1 our $VERSION = '1.05'; # VERSION
3 1 our $AUTHORITY = 'cpan:ARODLAND'; # AUTHORITY
4  
5 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Digest::SHA qw(sha1);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use Digest::HMAC qw(hmac);
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 # OO interface
10 1 our @ISA=qw(Digest::HMAC);
11 sub new
12 7 ▶{
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
13 7 my $class = shift;
14 7 $class->SUPER::new($_[0], "Digest::SHA", 64); # Digest::SHA defaults to SHA-1
15 }
16  
17 # Functional interface
18 1 require Exporter;
19 1 *import = \&Exporter::import;
20 1 ▶use vars qw(@EXPORT_OK);
Subroutine BEGIN: called CC=1 SCAR=0.0
21 1 @EXPORT_OK=qw(hmac_sha1 hmac_sha1_hex);
22  
23 sub hmac_sha1
24 7 ▶{
Subroutine hmac_sha1: called CC=1 SCAR=0.0
Pod undocumented
25 7 hmac($_[0], $_[1], \&sha1, 64);
26 }
27  
28 sub hmac_sha1_hex
29 0 ▶{
Subroutine hmac_sha1_hex: not called CC=1 SCAR=6.9
Pod undocumented
30 0 unpack("H*", &hmac_sha1)
31 }
32  
33 1 1;
34  
35 __END__
« HMAC_MD5.pm ↑ Summary