line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Digest::Luffa; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
338026
|
use strict; |
|
6
|
|
|
|
|
15
|
|
|
6
|
|
|
|
|
259
|
|
4
|
6
|
|
|
6
|
|
30
|
use warnings; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
194
|
|
5
|
6
|
|
|
6
|
|
6991
|
use parent qw(Exporter Digest::base); |
|
6
|
|
|
|
|
2080
|
|
|
6
|
|
|
|
|
31
|
|
6
|
|
|
|
|
|
|
|
7
|
6
|
|
|
6
|
|
5528
|
use MIME::Base64 (); |
|
6
|
|
|
|
|
5435
|
|
|
6
|
|
|
|
|
1280
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.04'; |
10
|
|
|
|
|
|
|
$VERSION = eval $VERSION; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
eval { |
13
|
|
|
|
|
|
|
require XSLoader; |
14
|
|
|
|
|
|
|
XSLoader::load(__PACKAGE__, $VERSION); |
15
|
|
|
|
|
|
|
1; |
16
|
|
|
|
|
|
|
} or do { |
17
|
|
|
|
|
|
|
require DynaLoader; |
18
|
|
|
|
|
|
|
DynaLoader::bootstrap(__PACKAGE__, $VERSION); |
19
|
|
|
|
|
|
|
}; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
our @EXPORT_OK = qw( |
22
|
|
|
|
|
|
|
luffa_224 luffa_224_hex luffa_224_base64 |
23
|
|
|
|
|
|
|
luffa_256 luffa_256_hex luffa_256_base64 |
24
|
|
|
|
|
|
|
luffa_384 luffa_384_hex luffa_384_base64 |
25
|
|
|
|
|
|
|
luffa_512 luffa_512_hex luffa_512_base64 |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub add_bits { |
29
|
200
|
|
|
200
|
0
|
148007
|
my ($self, $data, $bits) = @_; |
30
|
200
|
50
|
|
|
|
671
|
if (2 == @_) { |
31
|
0
|
|
|
|
|
0
|
return $self->_add_bits(pack('B*', $data), length $data); |
32
|
|
|
|
|
|
|
} |
33
|
200
|
|
|
|
|
2761
|
return $self->_add_bits($data, $bits); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |