line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Crypt::Perl::RNG; |
2
|
|
|
|
|
|
|
|
3
|
12
|
|
|
12
|
|
74
|
use strict; |
|
12
|
|
|
|
|
28
|
|
|
12
|
|
|
|
|
297
|
|
4
|
12
|
|
|
12
|
|
57
|
use warnings; |
|
12
|
|
|
|
|
21
|
|
|
12
|
|
|
|
|
271
|
|
5
|
|
|
|
|
|
|
|
6
|
12
|
|
|
12
|
|
4429
|
use Bytes::Random::Secure::Tiny (); |
|
12
|
|
|
|
|
67738
|
|
|
12
|
|
|
|
|
1419
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
my %PID_RNG; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub _get { |
11
|
13420
|
|
66
|
13420
|
|
53662
|
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
|
12980
|
|
|
12980
|
0
|
25033
|
return _get()->bytes_hex(@_); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub bit_string { |
23
|
432
|
|
|
432
|
0
|
1079
|
my ($count) = @_; |
24
|
|
|
|
|
|
|
|
25
|
432
|
|
|
|
|
2768
|
return _get()->string_from('01', $count); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |