line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Crypt::Perl::RNG; |
2
|
|
|
|
|
|
|
|
3
|
12
|
|
|
12
|
|
61
|
use strict; |
|
12
|
|
|
|
|
19
|
|
|
12
|
|
|
|
|
253
|
|
4
|
12
|
|
|
12
|
|
44
|
use warnings; |
|
12
|
|
|
|
|
26
|
|
|
12
|
|
|
|
|
223
|
|
5
|
|
|
|
|
|
|
|
6
|
12
|
|
|
12
|
|
3785
|
use Bytes::Random::Secure::Tiny (); |
|
12
|
|
|
|
|
56747
|
|
|
12
|
|
|
|
|
1211
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
my %PID_RNG; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub _get { |
11
|
13751
|
|
66
|
13751
|
|
54005
|
return $PID_RNG{$$} ||= Bytes::Random::Secure::Tiny->new(); |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub bytes { |
15
|
8
|
|
|
8
|
0
|
21
|
return _get()->bytes(@_); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub bytes_hex { |
19
|
13323
|
|
|
13323
|
0
|
25769
|
return _get()->bytes_hex(@_); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub bit_string { |
23
|
420
|
|
|
420
|
0
|
1073
|
my ($count) = @_; |
24
|
|
|
|
|
|
|
|
25
|
420
|
|
|
|
|
2442
|
return _get()->string_from('01', $count); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |