| 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
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
| |||||||||||||||||||||
| 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; | |||||||||||||||||||