Branch Coverage

inc/CryptX_Digest.xs.inc
Criterion Covered Total %
branch 55 88 62.5


line true false branch
11 3388 0 char *digest_name = strcmp(cname, "Crypt::Digest") == 0 ? pname : cname;
14 0 3388 if (id == -1) croak("FATAL: find_hash failed for '%s'", digest_name);
17 0 3388 if (!RETVAL) croak("FATAL: Newz failed");
21 0 3388 if (rv != CRYPT_OK) {
43 0 33 if (rv != CRYPT_OK) croak("FATAL: digest init failed: %s", error_to_string(rv));
45 0 33 XPUSHs(ST(0)); /* return self */
51 90 0 if (self->desc != NULL && cryptx_internal_noclone_hash(self->desc->name)) {
0 90 if (self->desc != NULL && cryptx_internal_noclone_hash(self->desc->name)) {
55 0 90 if (!RETVAL) croak("FATAL: Newz failed");
68 33 3387 if (self->finalized) croak("FATAL: digest object already finalized");
69 3486 3387 for(i = 1; i < items; i++) {
71 3440 46 if (inlen > 0) {
73 0 3440 if (rv != CRYPT_OK) croak("FATAL: digest process failed: %s", error_to_string(rv));
76 0 3387 XPUSHs(ST(0)); /* return self */
92 66 3381 if (self->finalized) croak("FATAL: digest object already finalized");
94 0 3381 if (rv != CRYPT_OK) croak("FATAL: digest done failed: %s", error_to_string(rv));
98 165 3216 if (ix == 3) {
100 0 165 if (rv != CRYPT_OK) croak("FATAL: base64url_encode failed: %s", error_to_string(rv));
103 297 2919 else if (ix == 2) {
105 0 297 if (rv != CRYPT_OK) croak("FATAL: base64_encode failed: %s", error_to_string(rv));
108 2622 297 else if (ix == 1) {
110 0 2622 if (rv != CRYPT_OK) croak("FATAL: base16_encode failed: %s", error_to_string(rv));
136 0 991 if (id == -1) croak("FATAL: find_digest failed for '%s'", digest_name);
141 0 991 if (rv != CRYPT_OK) croak("FATAL: digest init failed: %s", error_to_string(rv));
142 1519 991 for (i = 1; i < items; i++) {
144 1288 231 if (inlen > 0) {
146 0 1288 if (rv != CRYPT_OK) croak("FATAL: digest process failed: %s", error_to_string(rv));
150 0 991 if (rv != CRYPT_OK) croak("FATAL: digest done failed: %s", error_to_string(rv));
153 165 826 if (ix == 3) {
155 0 165 if (rv != CRYPT_OK) croak("FATAL: base64url_encode failed: %s", error_to_string(rv));
158 264 562 else if (ix == 2) {
160 0 264 if (rv != CRYPT_OK) croak("FATAL: base64_encode failed: %s", error_to_string(rv));
163 266 296 else if (ix == 1) {
165 0 266 if (rv != CRYPT_OK) croak("FATAL: base16_encode failed: %s", error_to_string(rv));
179 33 1917 if (sv_isobject(param) && sv_derived_from(param, "Crypt::Digest")) {
33 0 if (sv_isobject(param) && sv_derived_from(param, "Crypt::Digest")) {
188 1917 0 digest_name = SvPOK_spec(param) && strcmp(SvPVbyte(param, plen), "Crypt::Digest") ? SvPVbyte(param, plen) : extra;
0 1917 digest_name = SvPOK_spec(param) && strcmp(SvPVbyte(param, plen), "Crypt::Digest") ? SvPVbyte(param, plen) : extra;
0 0 digest_name = SvPOK_spec(param) && strcmp(SvPVbyte(param, plen), "Crypt::Digest") ? SvPVbyte(param, plen) : extra;
0 0 digest_name = SvPOK_spec(param) && strcmp(SvPVbyte(param, plen), "Crypt::Digest") ? SvPVbyte(param, plen) : extra;
0 0 digest_name = SvPOK_spec(param) && strcmp(SvPVbyte(param, plen), "Crypt::Digest") ? SvPVbyte(param, plen) : extra;
132 1785 digest_name = SvPOK_spec(param) && strcmp(SvPVbyte(param, plen), "Crypt::Digest") ? SvPVbyte(param, plen) : extra;
190 0 1917 if (id == -1) croak("FATAL: find_hash failed for '%s'", digest_name);
192 0 1917 if (!rv) croak("FATAL: invalid hashsize for '%s'", digest_name);;