Branch Coverage

inc/CryptX_Mode_CTR.xs.inc
Criterion Covered Total %
branch 35 62 56.4


line true false branch
12 0 45 if (!RETVAL) croak("FATAL: Newz failed");
16 0 45 if (RETVAL->cipher_id == -1) {
20 9 36 if (ctr_mode == 0) RETVAL->ctr_mode_param = CTR_COUNTER_LITTLE_ENDIAN;
21 24 21 if (ctr_mode == 1) RETVAL->ctr_mode_param = CTR_COUNTER_BIG_ENDIAN;
22 6 39 if (ctr_mode == 2) RETVAL->ctr_mode_param = CTR_COUNTER_LITTLE_ENDIAN|LTC_CTR_RFC3686;
23 6 39 if (ctr_mode == 3) RETVAL->ctr_mode_param = CTR_COUNTER_BIG_ENDIAN|LTC_CTR_RFC3686;
24 0 45 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;
49 44 0 if (!SvPOK_spec(key)) croak("FATAL: key must be string/buffer scalar");
0 44 if (!SvPOK_spec(key)) croak("FATAL: key must be string/buffer scalar");
0 0 if (!SvPOK_spec(key)) croak("FATAL: key must be string/buffer scalar");
0 0 if (!SvPOK_spec(key)) croak("FATAL: key must be string/buffer scalar");
0 0 if (!SvPOK_spec(key)) croak("FATAL: key must be string/buffer scalar");
52 44 0 if (!SvPOK_spec(iv)) croak("FATAL: iv must be string/buffer scalar");
0 44 if (!SvPOK_spec(iv)) croak("FATAL: iv must be string/buffer scalar");
0 0 if (!SvPOK_spec(iv)) croak("FATAL: iv must be string/buffer scalar");
0 0 if (!SvPOK_spec(iv)) croak("FATAL: iv must be string/buffer scalar");
0 0 if (!SvPOK_spec(iv)) croak("FATAL: iv must be string/buffer scalar");
54 0 44 if (i_len != (STRLEN)cipher_descriptor[self->cipher_id].block_length) {
59 0 44 if (rv != CRYPT_OK) {
63 22 22 self->direction = ix == 1 ? 1 : -1;
64 0 44 XPUSHs(ST(0)); /* return self */
76 1053 548 for (j = 1; j < items; j++) {
78 1051 2 if (in_data_len > 0) {
79 1051 0 out_data = (unsigned char*)SvGROW(RETVAL, out_len + in_data_len + 1) + out_len;
82 969 out_data = (unsigned char*)SvGROW(RETVAL, out_len + in_data_len + 1) + out_len;
81 525 526 if (self->direction == 1) {
83 0 525 if (rv != CRYPT_OK) {
88 525 1 else if (self->direction == -1) {
90 0 525 if (rv != CRYPT_OK) {
101 546 2 if (out_len > 0) SvCUR_set(RETVAL, out_len);