Branch Coverage

blib/lib/Vigil/Crypt.pm
Criterion Covered Total %
branch 8 16 50.0


line true false branch
15 0 1 unless (defined $encryption_key and length $encryption_key == 64)
33 0 1 unless (defined $plaintext and length $plaintext)
53 0 1 unless (eval { do { my $cipher = "Crypt::AuthEnc::ChaCha20Poly1305"->new($self->{'_encryption_key'}, $nonce); $cipher->adata_add($aad); my $ct = $cipher->encrypt_add($plaintext); my $tag = $cipher->encrypt_done; $blob = $nonce . $ct . $tag; 1 } })
71 0 1 unless (defined $blob_hex and length $blob_hex)
77 0 1 if ($@ or not defined $decoded)
82 0 1 if (length $decoded < 28)
98 0 1 unless ($ok)
131 0 2 unless length $pepper == 13