Branch Coverage

inc/CryptX_Mac_PMAC.xs.inc
Criterion Covered Total %
branch 43 64 67.1


line true false branch
17 0 482 if (id == -1) croak("FATAL: find_cipfer failed for '%s'", cipher_name);
19 0 482 if (!SvPOK(key)) croak("FATAL: key must be string/buffer scalar");
20 482 0 k = (unsigned char *) SvPVbyte(key, k_len);
23 0 482 if (!RETVAL) croak("FATAL: Newz failed");
26 0 482 if (rv != CRYPT_OK) {
43 0 0 if (!RETVAL) croak("FATAL: Newz failed");
56 494 486 for(i = 1; i < items; i++) {
57 486 8 in_data = (unsigned char *)SvPVbyte(ST(i), in_data_len);
58 466 28 if (in_data_len > 0) {
60 0 466 if (rv != CRYPT_OK) croak("FATAL: pmac_process failed: %s", error_to_string(rv));
63 0 486 XPUSHs(ST(0)); /* return self */
81 0 482 if (rv != CRYPT_OK) croak("FATAL: pmac_done failed: %s", error_to_string(rv));
83 1 481 if (ix == 3) {
85 0 1 if (rv != CRYPT_OK) croak("FATAL: base64url_encode failed: %s", error_to_string(rv));
88 1 480 else if (ix == 2) {
90 0 1 if (rv != CRYPT_OK) croak("FATAL: base64_encode failed: %s", error_to_string(rv));
93 14 466 else if (ix == 1) {
95 0 14 if (rv != CRYPT_OK) croak("FATAL: base16_encode failed: %s", error_to_string(rv));
115 52 0 unsigned char *k = (unsigned char *)SvPVbyte(key, klen);
123 0 52 if (id == -1) croak("FATAL: find_cipher failed for '%s'", cipher_name);
125 0 52 if (rv != CRYPT_OK) croak("FATAL: pmac_init failed: %s", error_to_string(rv));
126 60 52 for (i = 2; i < items; i++) {
127 44 16 in = (unsigned char *)SvPVbyte(ST(i), inlen);
128 44 16 if (inlen > 0) {
130 0 44 if (rv != CRYPT_OK) croak("FATAL: pmac_process failed: %s", error_to_string(rv));
134 0 52 if (rv != CRYPT_OK) croak("FATAL: pmac_done failed: %s", error_to_string(rv));
137 13 39 if (ix == 3) {
139 0 13 if (rv != CRYPT_OK) croak("FATAL: base64url_encode failed: %s", error_to_string(rv));
142 13 26 else if (ix == 2) {
144 0 13 if (rv != CRYPT_OK) croak("FATAL: base64_encode failed: %s", error_to_string(rv));
147 13 13 else if (ix == 1) {
149 0 13 if (rv != CRYPT_OK) croak("FATAL: base16_encode failed: %s", error_to_string(rv));