Branch Coverage

blib/lib/Crypt/PK/X25519.pm
Criterion Covered Total %
branch 0 74 0.0


line true false branch
20 0 0 @_ > 0 ? :
25 0 0 unless $key
26 0 0 unless length $key == 32
27 0 0 unless $type
28 0 0 if $type eq "private"
29 0 0 if $type eq "public"
36 0 0 unless $key
39 0 0 if (ref $key eq "HASH")
40 0 0 if ($key->{'kty'} and $key->{'kty'} eq "OKP" and $key->{'crv'} and $key->{'crv'} eq "X25519")
43 0 0 if $key->{'d'}
44 0 0 if $key->{'x'}
46 0 0 if ($key->{'curve'} and $key->{'curve'} eq "x25519" and $key->{'priv'} || $key->{'pub'})
48 0 0 if $key->{'priv'}
49 0 0 if $key->{'pub'}
55 0 0 if (ref $key eq 'SCALAR') { }
0 0 elsif (-f $key) { }
64 0 0 unless $data
66 0 0 if ($data =~ /-----BEGIN PUBLIC KEY-----(.*?)-----END/gs) { }
0 0 elsif ($data =~ /-----BEGIN PRIVATE KEY-----(.*?)-----END/gs) { }
0 0 elsif ($data =~ /-----BEGIN ENCRYPTED PRIVATE KEY-----(.*?)-----END/gs) { }
0 0 elsif ($data =~ /-----BEGIN X25519 PRIVATE KEY-----(.*?)-----END/gs) { }
0 0 elsif ($data =~ /^\s*(\{.*?\})\s*$/s) { }
0 0 elsif (length $data == 32) { }
67 0 0 unless $data = pem_to_der($data, $password)
71 0 0 unless $data = pem_to_der($data, $password)
75 0 0 unless $data = pem_to_der($data, $password)
79 0 0 unless $data = pem_to_der($data, $password)
84 0 0 if ($h->{'kty'} and $h->{'kty'} eq "OKP" and $h->{'crv'} and $h->{'crv'} eq "X25519")
85 0 0 if $h->{'d'}
86 0 0 if $h->{'x'}
96 0 0 if $rv
105 0 0 unless $key
106 0 0 if substr($type, 0, 7) eq "private"
107 0 0 if substr($type, 0, 6) eq "public"
114 0 0 unless $kh
117 0 0 if $type and $type eq "private" and $kh->{'priv'}
118 0 0 $wanthash ? :