lib/Crypt/Perl/RNG.pm

filter: Statementstmt 100% 16 / 16 Branchbran n/a Conditioncond 66.6% 2 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 3 totaltotal 80.6% 25 / 31 CC 2 SCAR 2.4
CC
2
Cov
95%
_get
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« lib/Crypt/Perl/ECDSA/EC/Curve.pm ↑ Summary lib/Crypt/Perl/RSA/KeyBase.pm »
1 package Crypt::Perl::RNG;
2  
3 12 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 12 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 12 ▶use Bytes::Random::Secure::Tiny ();
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 12 my %PID_RNG;
9  
10 sub _get {
11 10441 ▶ return $PID_RNG{$$} ||= Bytes::Random::Secure::Tiny->new();
Subroutine _get: called CC=2 SCAR=7.2
Condition66%2/3
$PID_RNG{$$} ||= "Bytes::Random::Secure::Tiny"->new
l!l&&r!l&&!r
1043470
MC/DC0%0/2
$PID_RNG{$$} ||= "Bytes::Random::Secure::Tiny"->new
$PID_RNG{$$} "Bytes::Random::Secure::Tiny"->new
Truth table66%2/3
A ||= B
A= $PID_RNG{$$}B= "Bytes::Random::Secure::Tiny"->new
ABresult
1X1
011
000
12 }
13  
14 sub bytes {
15 8 ▶ return _get()->bytes(@_);
Subroutine bytes: called CC=1 SCAR=0.0
Pod undocumented
16 }
17  
18 sub bytes_hex {
19 9982 ▶ return _get()->bytes_hex(@_);
Subroutine bytes_hex: called CC=1 SCAR=0.0
Pod undocumented
20 }
21  
22 sub bit_string {
23 451 ▶ my ($count) = @_;
Subroutine bit_string: called CC=1 SCAR=0.0
Pod undocumented
24  
25 451 return _get()->string_from('01', $count);
26 }
27  
28 12 1;
« lib/Crypt/Perl/ECDSA/EC/Curve.pm ↑ Summary lib/Crypt/Perl/RSA/KeyBase.pm »