Branch Coverage

inc/CryptX_Mac_Poly1305.xs.inc
Criterion Covered Total %
branch 41 60 68.3


line true false branch
15 0 18 if (!SvPOK(key)) croak("FATAL: key must be string/buffer scalar");
16 18 0 k = (unsigned char *) SvPVbyte(key, k_len);
19 0 18 if (!RETVAL) croak("FATAL: Newz failed");
22 0 18 if (rv != CRYPT_OK) {
39 0 0 if (!RETVAL) croak("FATAL: Newz failed");
52 30 22 for(i = 1; i < items; i++) {
53 26 4 in_data = (unsigned char *)SvPVbyte(ST(i), in_data_len);
54 26 4 if (in_data_len > 0) {
56 0 26 if (rv != CRYPT_OK) croak("FATAL: poly1305_process failed: %s", error_to_string(rv));
59 0 22 XPUSHs(ST(0)); /* return self */
77 0 18 if (rv != CRYPT_OK) croak("FATAL: poly1305_done failed: %s", error_to_string(rv));
79 1 17 if (ix == 3) {
81 0 1 if (rv != CRYPT_OK) croak("FATAL: base64url_encode failed: %s", error_to_string(rv));
84 1 16 else if (ix == 2) {
86 0 1 if (rv != CRYPT_OK) croak("FATAL: base64_encode failed: %s", error_to_string(rv));
89 8 8 else if (ix == 1) {
91 0 8 if (rv != CRYPT_OK) croak("FATAL: base16_encode failed: %s", error_to_string(rv));
111 28 0 unsigned char *k = (unsigned char *)SvPVbyte(key, klen);
119 0 28 if (rv != CRYPT_OK) croak("FATAL: poly1305_init failed: %s", error_to_string(rv));
120 36 28 for (i = 1; i < items; i++) {
121 28 8 in = (unsigned char *)SvPVbyte(ST(i), inlen);
122 28 8 if (inlen > 0) {
124 0 28 if (rv != CRYPT_OK) croak("FATAL: poly1305_process failed: %s", error_to_string(rv));
128 0 28 if (rv != CRYPT_OK) croak("FATAL: poly1305_done failed: %s", error_to_string(rv));
131 7 21 if (ix == 3) {
133 0 7 if (rv != CRYPT_OK) croak("FATAL: base64url_encode failed: %s", error_to_string(rv));
136 7 14 else if (ix == 2) {
138 0 7 if (rv != CRYPT_OK) croak("FATAL: base64_encode failed: %s", error_to_string(rv));
141 7 7 else if (ix == 1) {
143 0 7 if (rv != CRYPT_OK) croak("FATAL: base16_encode failed: %s", error_to_string(rv));