line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Digest::Skein; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
53671
|
use 5.008000; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
67
|
|
4
|
2
|
|
|
2
|
|
9
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
329
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
require Exporter; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( |
11
|
|
|
|
|
|
|
'all' => [ |
12
|
|
|
|
|
|
|
qw( |
13
|
|
|
|
|
|
|
skein_256 |
14
|
|
|
|
|
|
|
skein_512 |
15
|
|
|
|
|
|
|
skein_1024 |
16
|
|
|
|
|
|
|
skein_256_hex |
17
|
|
|
|
|
|
|
skein_512_hex |
18
|
|
|
|
|
|
|
skein_1024_hex |
19
|
|
|
|
|
|
|
skein_256_base64 |
20
|
|
|
|
|
|
|
skein_512_base64 |
21
|
|
|
|
|
|
|
skein_1024_base64 |
22
|
|
|
|
|
|
|
), |
23
|
|
|
|
|
|
|
], |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
our $VERSION = '0.05'; |
29
|
|
|
|
|
|
|
our $XS_VERSION = $VERSION; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
require XSLoader; |
32
|
|
|
|
|
|
|
XSLoader::load( 'Digest::Skein', $XS_VERSION ); |
33
|
|
|
|
|
|
|
|
34
|
2
|
|
|
2
|
|
990
|
use bytes; |
|
2
|
|
|
|
|
16
|
|
|
2
|
|
|
|
|
10
|
|
35
|
2
|
|
|
2
|
|
57
|
use base qw( Digest::base ); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
788
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub new { |
38
|
6
|
|
|
6
|
0
|
140
|
my ( undef, $hashbits ) = @_; |
39
|
6
|
|
100
|
|
|
22
|
$hashbits ||= 512; |
40
|
|
|
|
|
|
|
return |
41
|
6
|
100
|
|
|
|
1131
|
$hashbits <= 256 ? Digest::Skein::256->new($hashbits) |
|
|
100
|
|
|
|
|
|
42
|
|
|
|
|
|
|
: $hashbits <= 512 ? Digest::Skein::512->new($hashbits) |
43
|
|
|
|
|
|
|
: Digest::Skein::1024->new($hashbits); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
1
|
|
|
1
|
0
|
2454
|
sub skein_256_hex { unpack 'H*', skein_256(@_) } |
47
|
1
|
|
|
1
|
0
|
84
|
sub skein_512_hex { unpack 'H*', skein_512(@_) } |
48
|
1
|
|
|
1
|
0
|
17
|
sub skein_1024_hex { unpack 'H*', skein_1024(@_) } |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
0
|
0
|
0
|
sub skein_256_base64 { require MIME::Base64; MIME::Base64::encode( skein_256(@_) ) } |
|
0
|
|
|
|
|
0
|
|
51
|
1
|
|
|
1
|
0
|
8
|
sub skein_512_base64 { require MIME::Base64; MIME::Base64::encode( skein_512(@_) ) } |
|
1
|
|
|
|
|
10
|
|
52
|
0
|
|
|
0
|
0
|
|
sub skein_1024_base64 { require MIME::Base64; MIME::Base64::encode( skein_1024(@_) ) } |
|
0
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
@Digest::Skein::256::ISA = qw/ Digest::base /; |
55
|
|
|
|
|
|
|
@Digest::Skein::512::ISA = qw/ Digest::base /; |
56
|
|
|
|
|
|
|
@Digest::Skein::1024::ISA = qw/ Digest::base /; |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |
59
|
|
|
|
|
|
|
__END__ |