Branch Coverage

inc/CryptX_Mode_CTR.xs.inc
Criterion Covered Total %
branch 33 52 63.4


line true false branch
12 0 42 if (!RETVAL) croak("FATAL: Newz failed");
16 0 42 if (RETVAL->cipher_id == -1) {
20 6 36 if (ctr_mode == 0) RETVAL->ctr_mode_param = CTR_COUNTER_LITTLE_ENDIAN;
21 24 18 if (ctr_mode == 1) RETVAL->ctr_mode_param = CTR_COUNTER_BIG_ENDIAN;
22 6 36 if (ctr_mode == 2) RETVAL->ctr_mode_param = CTR_COUNTER_LITTLE_ENDIAN|LTC_CTR_RFC3686;
23 6 36 if (ctr_mode == 3) RETVAL->ctr_mode_param = CTR_COUNTER_BIG_ENDIAN|LTC_CTR_RFC3686;
24 0 42 if (ctr_width > 0 && ctr_width <= cipher_descriptor[RETVAL->cipher_id].block_length) RETVAL->ctr_mode_param |= ctr_width;
0 0 if (ctr_width > 0 && ctr_width <= cipher_descriptor[RETVAL->cipher_id].block_length) RETVAL->ctr_mode_param |= ctr_width;
46 0 42 if (!SvPOK(key)) croak("FATAL: key must be string/buffer scalar");
47 42 0 k = (unsigned char *) SvPVbyte(key, k_len);
49 0 42 if (!SvPOK(iv)) croak("FATAL: iv must be string/buffer scalar");
50 42 0 i = (unsigned char *) SvPVbyte(iv, i_len);
51 0 42 if (i_len != (STRLEN)cipher_descriptor[self->cipher_id].block_length) {
56 0 42 if (rv != CRYPT_OK) {
60 21 21 self->direction = ix == 1 ? 1 : -1;
61 0 42 XPUSHs(ST(0)); /* return self */
73 1050 546 for (j = 1; j < items; j++) {
74 1050 0 in_data = (unsigned char *)SvPVbyte(ST(j), in_data_len);
75 1050 0 if (in_data_len > 0) {
76 1050 0 out_data = (unsigned char*)SvGROW(RETVAL, out_len + in_data_len + 1) + out_len;
90 960 out_data = (unsigned char*)SvGROW(RETVAL, out_len + in_data_len + 1) + out_len;
78 525 525 if (self->direction == 1) {
80 0 525 if (rv != CRYPT_OK) {
85 525 0 else if (self->direction == -1) {
87 0 525 if (rv != CRYPT_OK) {
98 546 0 if (out_len > 0) SvCUR_set(RETVAL, out_len);