Branch Coverage

blib/lib/Crypt/RSA/Key/Private.pm
Criterion Covered Total %
branch 59 80 73.7


line true false branch
25 1 19 if ($params{'Filename'}) { }
31 3 16 if $params{'Identity'}
33 17 2 if $params{'Password'}
44 4695 71 if ($key =~ /^(e|n|d|p|q|dp|dq|u|phi)$/) { }
57 14 elsif ($key =~ /^Identity|Cipher|Password$/) { }
14 0 elsif ($key =~ /^Checked$/) { }
46 154 4541 if (defined $value)
48 145 9 if (ref $value eq 'Math::BigInt') { }
0 9 elsif (ref $value eq 'Math::Pari') { }
56 4656 39 if (defined $$prikey)
57 8 4648 unless ref $$prikey eq 'Math::BigInt'
60 4 35 if defined $self->{'private_encrypted'}{"_$key"}
63 52 5 if $value
67 14 0 if $value and $package eq 'Crypt::RSA::Key::Private'
77 0 2 unless $self->{'Password'}
100 2 1 if $params{'Password'}
101 1 2 unless $self->{'Password'}
115 545 14 if $self->{'Checked'}
118 0 14 if $self->{'Hidden'}
120 0 0 unless $self->n and $self->d or $self->n and $self->p and $self->q
123 11 3 if ($self->p and $self->q)
124 0 11 if $self->n =~ /\D/
125 0 11 if $self->p =~ /\D/
126 0 11 if $self->q =~ /\D/
127 0 11 unless $self->n == $self->p * $self->q
128 0 11 unless &is_prime(scalar $self->p)
129 0 11 unless &is_prime(scalar $self->q)
132 11 3 if ($self->e)
134 0 11 if $self->e =~ /\D/
137 0 11 unless $KI == 1
140 11 3 if ($self->dp)
142 0 11 unless $self->dp == $self->d % ($self->p - 1)
145 11 3 if ($self->dq)
147 0 11 unless $self->dq == $self->d % ($self->q - 1)
150 11 0 if ($self->u and $self->q and $self->p)
152 0 11 unless $self->u == $m
178 0 1 unless open my $disk, '>', $params{'Filename'}
189 0 1 unless open my $disk, '<', $params{'Filename'}
203 1 1 if ($self->{'private'})
219 1 1 if ($self->{'private'})