Branch Coverage

lib/Net/SSH/Perl/Cipher/ChachaPoly.xs
Criterion Covered Total %
branch 18 30 60.0


line true false branch
17 12 0 if (keysize != 16 && keysize != 32)
0 12 if (keysize != 16 && keysize != 32)
21 12 0 chacha_keysetup(RETVAL, (unsigned char *) SvPV_nolen(key), keysize*8);
35 6 6 void *bytes = SvPV(data,size);
37 12 0 if (size) {
41 12 0 chacha_encrypt_bytes(self, bytes, (unsigned char *) SvPV_nolen(RETVAL), (int) size);
57 12 0 STRLEN iv_l ; unsigned char *iv_p = (unsigned char *) SvPVbyte (iv, iv_l);
59 0 12 if (iv_l < 8) {
62 12 0 STRLEN counter_l ; unsigned char *counter_p = (unsigned char *) SvPVbyte (counter, counter_l);
63 6 6 if (counter_l == 0)
66 0 6 else if (counter_l < 8)
85 3 3 void *databytes = SvPV(data,size);
89 0 6 if (keysize != POLY1305_KEYLEN)
91 6 0 void *keybytes = SvPV_nolen(key);
96 6 0 poly1305_auth((unsigned char *) SvPV_nolen(RETVAL),databytes,(int) size,keybytes);