blib/lib/Crypt/PK.pm

filter: Statementstmt 100% 23 / 23 Branchbran 66.6% 4 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 93.9% 31 / 33 CC 4 SCAR 10.0
CC
4
Cov
93%
_ssh_parse
4.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.7
« blib/lib/Crypt/AuthEnc/XChaCha20Poly1305.pm ↑ Summary blib/lib/Crypt/AuthEnc/OCB.pm »
1 package Crypt::PK;
2  
3 19 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 19 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 19 our $VERSION = '0.091';
6  
7 19 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 11 ▶sub _ssh_parse {
Subroutine _ssh_parse: called CC=4 SCAR=13.9
10 11 my $raw = shift;
11 11 ▶ return unless defined $raw;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $raw 0 11 11
12 11 my $len = length($raw);
13 11 my @parts = ();
14 11 my $i = 0;
15 11 while (1) {
16 45 ▶ last unless $i + 4 <= $len;
Branch: 1 branch
BranchTrueFalseTotal
unless $i + 4 <= $len 11 34 45
17 34 my $part_len = unpack("N4", substr($raw, $i, 4));
18 34 ▶ last unless $i + 4 + $part_len <= $len;
Branch: 1 branch
BranchTrueFalseTotal
unless $i + 4 + $part_len <= $len 0 34 34
19 34 push @parts, substr($raw, $i + 4, $part_len);
20 34 $i += $part_len + 4;
21 }
22 11 return @parts;
23 }
24  
25 19 1;
26  
27 =pod
28  
29 =head1 NAME
30  
31 Crypt::PK - [internal only]
32  
33 =head1 SYNOPSIS
34  
35 Do not use this module directly.
36  
37 Use a concrete public-key module instead.
38  
39 =head1 SEE ALSO
40  
41 =over
42  
43 =item * L<CryptX>
44  
45 =item * L<Crypt::PK::RSA>, L<Crypt::PK::ECC>, L<Crypt::PK::DSA>, L<Crypt::PK::DH>
46  
47 =item * L<Crypt::PK::Ed25519>, L<Crypt::PK::Ed448>, L<Crypt::PK::X25519>, L<Crypt::PK::X448>
48  
49 =back
50  
51 =cut
« blib/lib/Crypt/AuthEnc/XChaCha20Poly1305.pm ↑ Summary blib/lib/Crypt/AuthEnc/OCB.pm »