Branch Coverage

blib/lib/VOMS/Lite/RSAKey.pm
Criterion Covered Total %
branch 65 162 40.1


line true false branch
53 0 947 if (defined $input{'RandomFile'})
56 4 943 unless (defined $input{'Lower'})
57 939 8 if (ref $input{'Lower'} ne 'Math::BigInt')
60 4 943 defined $input{'Bits'} ? :
63 943 4 if (defined $input{'Upper'})
64 0 943 if (ref $input{'Upper'} ne 'Math::BigInt')
66 4 939 if (defined $input{'Parity'})
68 2 2 if ($input{'Parity'} =~ /^o/i xor $input{'Lower'}->is_odd)
76 0 947 unless defined $input{'Bits'}
81 0 947 if (ref $Random eq 'CODE') { }
84 0 0 if ($SizeInBits eq 'yes')
93 0 30459 if (read(RND, $char, 1) != 1)
94 3 125 if ($SizeInBits eq 'yes' and $count == 1 and ord $char < 128)
104 943 4 if (defined $input{'Range'})
107 462 481 if ($rem->bmul(2)->bcmp($tmp) != -1)
110 943 4 if ($SizeInBits eq 'no') { }
111 4 939 if (defined $input{'Parity'})
112 943 0 if (defined $input{'Lower'})
114 2 2 if ($input{'Parity'} =~ /^o/i and $x->is_even)
115 0 4 if ($input{'Parity'} =~ /^e/i and $x->is_odd)
1377 0 8 unless (defined $ref)
1380 0 8 unless defined $input{'Start'}
1382 8 0 unless (defined $input{'Tests'})
1384 8 0 unless defined $input{'D'}
1386 0 8 if (ref $input{'Start'} ne 'Math::BigInt')
1394 851 0 if defined $input{'Verbose'}
1395 0 851 if $Test eq 'D' and not DivisionTest(\%input)
1396 0 851 if $Test eq 'F' and not FermatTest(\%input)
1397 0 851 if $Test eq 'S' and not SolovayStrassenTest(\%input)
1398 843 8 if $Test eq 'M' and not MillerRabinTest(\%input)
1402 8 0 if defined $input{'Verbose'}
1408 0 0 unless (defined $ref)
1410 0 0 unless (defined $input{'Candidate'})
1411 0 0 if (ref $input{'Candidate'} ne 'Math::BigInt')
1412 0 0 unless defined $input{'D'}
1415 0 0 if ($input{'Candidate'}->copy->bmod($primes[$i])->bcmp(0) == 0)
1417 0 0 if (defined $input{'Verbose'})
1423 0 0 unless (defined $ref)
1425 0 0 unless (defined $input{'Candidate'})
1426 0 0 if (ref $input{'Candidate'} ne 'Math::BigInt')
1427 0 0 unless defined $input{'F'}
1436 0 0 if ($m->bcmp(1) != 0)
1437 0 0 if defined $input{'Verbose'}
1439 0 0 if defined $input{'Verbose'}
1445 0 0 unless (defined $ref)
1447 0 0 unless (defined $input{'Candidate'})
1448 0 0 if (ref $input{'Candidate'} ne 'Math::BigInt')
1449 0 0 unless defined $input{'S'}
1455 0 0 if ($r->bcmp(1) != 0 and $r->bcmp($input{'Candidate'}->copy->bdec) != 0)
1458 0 0 if ($r->bcmp($s->bmod($input{'Candidate'})) != 0)
1459 0 0 if defined $input{'Verbose'}
1461 0 0 if defined $input{'Verbose'}
1468 0 0 if (ref $a ne 'Math::BigInt')
1469 0 0 if (ref $n ne 'Math::BigInt')
1470 0 0 if $n->is_even
1471 0 0 if $n->bcmp($a) < 0
1472 0 0 if $n->bcmp(3) < 0
1474 0 0 if $a->bcmp(0) == 0
1475 0 0 if $a->bcmp(1) == 0
1482 0 0 if ($e % 2 == 0) { }
1485 0 0 if ($n8 == 1 or $n8 == 7)
1487 0 0 if ($n->copy->bmod(4)->numify == 3 and $a1->copy->bmod(4)->numify == 3)
1489 0 0 $a1->bcmp(1) == 0 ? :
1494 0 851 unless (defined $ref)
1496 0 851 unless (defined $input{'Candidate'})
1497 0 851 if (ref $input{'Candidate'} ne 'Math::BigInt')
1499 0 851 if $input{'Candidate'}->bcmp(3) < 0
1500 851 0 unless (defined $input{'M'})
1503 4255 851 if ($bits > $MRTests[$i]) { }
1513 867 72 if ($y->bcmp(1) != 0 and $y->bcmp($n1) != 0)
1515 4 883 if $y->bcmp($n1) == 0
1517 0 883 if ($y->bcmp(1) == 0)
1519 843 24 if ($y->bcmp($n1) != 0)
1521 96 0 if defined $input{'Verbose'}
1523 8 0 if defined $input{'Verbose'}
1529 0 4 unless (defined $ref)
1531 0 4 unless (defined $input{'Bits'})
1538 4 0 if (defined $input{'Verbose'} and $input{'Verbose'} =~ /^y/i) { }
1544 4 0 if (defined $input{'Verbose'} and $input{'Verbose'} =~ /^y/i) { }
1556 4 0 if $n->copy->broot(4)->bdiv(3)->bcmp($d) <= 1 and $n->copy->broot(4)->bmul(2)->bcmp($x->copy->bsub($y)->babs) < 1
1563 0 4 if ($len != $Nbits)