Branch Coverage

blib/lib/Crypt/Passphrase/Argon2/Encrypted.pm
Criterion Covered Total %
branch 16 22 72.7


line true false branch
41 3 11 unless my($subtype, $alg, $m_cost, $t_cost, $parallel, $id, $encoded_salt, $encoded_hash) = $pwhash =~ /$regex/
51 1 1 if (my($subtype, $alg, $id, $m_cost, $t_cost, $parallel, $salt, $hash) = _unpack_hash($input)) { }
1 0 elsif (($subtype, $m_cost, $t_cost, $parallel, my $encoded_salt, my $encoded_hash) = $input =~ /$unencrypted_regex/) { }
52 0 1 if $id eq $self->{'active'} and $alg eq $self->{'cipher'}
53 0 1 unless my $decrypted = eval { do { $self->decrypt_hash($alg, $id, $salt, $hash) } }
81 1 4 unless my($subtype, $alg, $id, $m_cost, $t_cost, $parallel, $salt, $hash) = _unpack_hash($pwhash)
82 1 3 if $pwhash ne _pack_hash(@{$self;}{"subtype", "cipher", "active", "memory_cost", "time_cost", "parallelism"}, $salt, $hash)
98 6 1 if (my($subtype, $alg, $id, $m_got, $t_got, $parallel_got, $salt, $hash) = _unpack_hash($pwhash)) { }
1 0 elsif ($pwhash =~ /$unencrypted_regex/) { }
99 0 6 unless my $raw = eval { do { argon2_raw($subtype, $password, $salt, $t_got, $m_got, $parallel_got, length $hash) } }
100 0 6 unless my $decrypted = eval { do { $self->decrypt_hash($alg, $id, $salt, $hash) } }