Branch Coverage

Nitrate.xs
Criterion Covered Total %
branch 19 32 59.3


line true false branch
17 17 0 nonce_buf = (unsigned char *)SvPV(nonce, nonce_len);
18 1 16 if ( nonce_len != crypto_secretbox_NONCEBYTES ) {
22 16 0 key_buf = (unsigned char *)SvPV(key, key_len);
23 1 15 if ( key_len != crypto_secretbox_KEYBYTES ) {
27 15 0 msg_buf = (unsigned char *)SvPV(msg, msg_len);
32 0 15 SvUPGRADE(encrypted_sv, SVt_PV);
56 14 0 nonce_buf = (unsigned char *)SvPV(nonce, nonce_len);
57 0 14 if ( nonce_len != crypto_secretbox_NONCEBYTES ) {
61 14 0 key_buf = (unsigned char *)SvPV(key, key_len);
62 0 14 if ( key_len != crypto_secretbox_KEYBYTES ) {
66 14 0 msg_buf = (unsigned char *)SvPV(ciphertext, msg_len);
67 1 13 if ( msg_len < crypto_secretbox_MACBYTES ) {
73 0 13 SvUPGRADE(decrypted_sv, SVt_PV);
84 0 13 if ( decrypt_result != 0 ) {
104 0 15 mXPUSHs( encrypted_sv );
115 0 13 mXPUSHs( decrypted_sv );