blib/lib/Crypt/Perl/RNG.pm untested

filter: Statementstmt 0.0% 0 / 15 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 29 CC 1 SCAR 6.9
CC
1
Cov
0%
_get
2.0
bytes
2.0
bytes_hex
2.0
CRAP 2.0
1 package Crypt::Perl::RNG;
2  
3 use strict;
4 use warnings;
5  
6 use Bytes::Random::Secure::Tiny ();
7  
8 my %PID_RNG;
9  
10 sub _get {
11 return $PID_RNG{$$} ||= Bytes::Random::Secure::Tiny->new();
12 }
13  
14 sub bytes {
15 return _get()->bytes(@_);
16 }
17  
18 sub bytes_hex {
19 return _get()->bytes_hex(@_);
20 }
21  
22 sub bit_string {
23 my ($count) = @_;
24  
25 return _get()->string_from('01', $count);
26 }
27  
28 1;