line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Digest::SIMD; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
192733
|
use strict; |
|
6
|
|
|
|
|
19
|
|
|
6
|
|
|
|
|
275
|
|
4
|
6
|
|
|
6
|
|
34
|
use warnings; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
249
|
|
5
|
6
|
|
|
6
|
|
6385
|
use parent qw(Exporter Digest::base); |
|
6
|
|
|
|
|
2603
|
|
|
6
|
|
|
|
|
34
|
|
6
|
|
|
|
|
|
|
|
7
|
6
|
|
|
6
|
|
6580
|
use MIME::Base64 (); |
|
6
|
|
|
|
|
6037
|
|
|
6
|
|
|
|
|
1295
|
|
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
|
|
|
|
|
|
|
simd_224 simd_224_hex simd_224_base64 |
23
|
|
|
|
|
|
|
simd_256 simd_256_hex simd_256_base64 |
24
|
|
|
|
|
|
|
simd_384 simd_384_hex simd_384_base64 |
25
|
|
|
|
|
|
|
simd_512 simd_512_hex simd_512_base64 |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub add_bits { |
29
|
200
|
|
|
200
|
0
|
134143
|
my ($self, $data, $bits) = @_; |
30
|
200
|
50
|
|
|
|
549
|
if (2 == @_) { |
31
|
0
|
|
|
|
|
0
|
return $self->_add_bits(pack('B*', $data), length $data); |
32
|
|
|
|
|
|
|
} |
33
|
200
|
|
|
|
|
7972
|
return $self->_add_bits($data, $bits); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |