Branch Coverage

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


line true false branch
11 3438 0 char *digest_name = strcmp(cname, "Crypt::Digest") == 0 ? pname : cname;
14 0 3438 if (id == -1) croak("FATAL: find_hash failed for '%s'", digest_name);
17 0 3438 if (!RETVAL) croak("FATAL: Newz failed");
21 0 3438 if (rv != CRYPT_OK) {
43 0 34 if (rv != CRYPT_OK) croak("FATAL: digest init failed: %s", error_to_string(rv));
45 0 34 XPUSHs(ST(0)); /* return self */
51 93 0 if (self->desc != NULL && cryptx_internal_noclone_hash(self->desc->name)) {
0 93 if (self->desc != NULL && cryptx_internal_noclone_hash(self->desc->name)) {
55 0 93 if (!RETVAL) croak("FATAL: Newz failed");
68 34 3437 if (self->finalized) croak("FATAL: digest object already finalized");
69 3539 3437 for(i = 1; i < items; i++) {
71 3492 47 if (inlen > 0) {
73 0 3492 if (rv != CRYPT_OK) croak("FATAL: digest process failed: %s", error_to_string(rv));
76 0 3437 XPUSHs(ST(0)); /* return self */
92 68 3431 if (self->finalized) croak("FATAL: digest object already finalized");
94 0 3431 if (rv != CRYPT_OK) croak("FATAL: digest done failed: %s", error_to_string(rv));
98 170 3261 if (ix == 3) {
100 0 170 if (rv != CRYPT_OK) croak("FATAL: base64url_encode failed: %s", error_to_string(rv));
103 306 2955 else if (ix == 2) {
105 0 306 if (rv != CRYPT_OK) croak("FATAL: base64_encode failed: %s", error_to_string(rv));
108 2649 306 else if (ix == 1) {
110 0 2649 if (rv != CRYPT_OK) croak("FATAL: base16_encode failed: %s", error_to_string(rv));
136 0 1020 if (id == -1) croak("FATAL: find_digest failed for '%s'", digest_name);
141 0 1020 if (rv != CRYPT_OK) croak("FATAL: digest init failed: %s", error_to_string(rv));
142 1564 1020 for (i = 1; i < items; i++) {
144 1326 238 if (inlen > 0) {
146 0 1326 if (rv != CRYPT_OK) croak("FATAL: digest process failed: %s", error_to_string(rv));
150 0 1020 if (rv != CRYPT_OK) croak("FATAL: digest done failed: %s", error_to_string(rv));
153 170 850 if (ix == 3) {
155 0 170 if (rv != CRYPT_OK) croak("FATAL: base64url_encode failed: %s", error_to_string(rv));
158 272 578 else if (ix == 2) {
160 0 272 if (rv != CRYPT_OK) croak("FATAL: base64_encode failed: %s", error_to_string(rv));
163 274 304 else if (ix == 1) {
165 0 274 if (rv != CRYPT_OK) croak("FATAL: base16_encode failed: %s", error_to_string(rv));
179 34 1922 if (sv_isobject(param) && sv_derived_from(param, "Crypt::Digest")) {
34 0 if (sv_isobject(param) && sv_derived_from(param, "Crypt::Digest")) {
188 1922 0 digest_name = SvPOK_spec(param) && strcmp(SvPVbyte(param, plen), "Crypt::Digest") ? SvPVbyte(param, plen) : extra;
0 1922 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;
136 1786 digest_name = SvPOK_spec(param) && strcmp(SvPVbyte(param, plen), "Crypt::Digest") ? SvPVbyte(param, plen) : extra;
190 0 1922 if (id == -1) croak("FATAL: find_hash failed for '%s'", digest_name);
192 0 1922 if (!rv) croak("FATAL: invalid hashsize for '%s'", digest_name);;