File Coverage

blib/lib/Crypt/Komihash.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition 2 2 100.0
subroutine 4 4 100.0
pod 1 1 100.0
total 21 21 100.0


line stmt bran cond sub pod time code
1             package Crypt::Komihash;
2              
3 2     2   226781 use strict;
  2         5  
  2         89  
4 2     2   23 use warnings;
  2         4  
  2         143  
5 2     2   15 use base qw(Exporter);
  2         3  
  2         778  
6             require XSLoader;
7              
8             our $VERSION = '0.08';
9              
10             XSLoader::load('Crypt::Komihash', $VERSION);
11              
12             our @EXPORT_OK = qw(komihash komihash_hex komirand_seed komirand64 get_rdtsc rdtsc_rand64);
13             our %EXPORT_TAGS = ( all => [ @EXPORT_OK ] );
14              
15             sub komihash_hex {
16 37     37 1 174582 my ($buf, $seed) = @_;
17              
18 37   100     153 $seed ||= 0;
19              
20 37         146 my $num = komihash($buf, $seed);
21 37         173 my $ret = sprintf("%016llx", $num);
22              
23 37         200 return $ret;
24             }
25              
26             1;
27              
28             __END__