File Coverage

blib/lib/Digest/JH.pm
Criterion Covered Total %
statement 13 13 100.0
branch 2 2 100.0
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 19 20 95.0


line stmt bran cond sub pod time code
1             package Digest::JH;
2              
3 7     7   233787 use strict;
  7         285  
  7         289  
4 7     7   43 use warnings;
  7         13  
  7         233  
5 7     7   10289 use parent qw(Exporter Digest::base);
  7         3238  
  7         42  
6              
7             our $VERSION = '0.05';
8             $VERSION = eval $VERSION;
9              
10             eval {
11             require XSLoader;
12             XSLoader::load(__PACKAGE__, $VERSION);
13             1;
14             } or do {
15             require DynaLoader;
16             DynaLoader::bootstrap(__PACKAGE__, $VERSION);
17             };
18              
19             our @EXPORT_OK = qw(
20             jh_224 jh_224_hex jh_224_base64
21             jh_256 jh_256_hex jh_256_base64
22             jh_384 jh_384_hex jh_384_base64
23             jh_512 jh_512_hex jh_512_base64
24             );
25              
26             sub add_bits {
27 204     204 0 162602 my ($self, $data, $bits) = @_;
28 204 100       554 if (2 == @_) {
29 4         115 return $self->_add_bits(pack('B*', $data), length $data);
30             }
31 200         7080 return $self->_add_bits($data, $bits);
32             }
33              
34              
35             1;
36              
37             __END__