line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Crypt::Perl::RNG; |
2
|
|
|
|
|
|
|
|
3
|
12
|
|
|
12
|
|
78
|
use strict; |
|
12
|
|
|
|
|
27
|
|
|
12
|
|
|
|
|
285
|
|
4
|
12
|
|
|
12
|
|
51
|
use warnings; |
|
12
|
|
|
|
|
21
|
|
|
12
|
|
|
|
|
259
|
|
5
|
|
|
|
|
|
|
|
6
|
12
|
|
|
12
|
|
4283
|
use Bytes::Random::Secure::Tiny (); |
|
12
|
|
|
|
|
65768
|
|
|
12
|
|
|
|
|
1366
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
my %PID_RNG; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub _get { |
11
|
10385
|
|
66
|
10385
|
|
45211
|
return $PID_RNG{$$} ||= Bytes::Random::Secure::Tiny->new(); |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub bytes { |
15
|
8
|
|
|
8
|
0
|
20
|
return _get()->bytes(@_); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub bytes_hex { |
19
|
9952
|
|
|
9952
|
0
|
21785
|
return _get()->bytes_hex(@_); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub bit_string { |
23
|
425
|
|
|
425
|
0
|
1163
|
my ($count) = @_; |
24
|
|
|
|
|
|
|
|
25
|
425
|
|
|
|
|
3281
|
return _get()->string_from('01', $count); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |