Branch Coverage

src/ldns/sha2.c
Criterion Covered Total %
branch 15 66 22.7


line true false branch
316 0 3 if (context == (ldns_sha256_CTX*)0) {
460 225 15 } while (j < 16);
483 705 15 } while (j < 64);
504 0 3 if (len == 0) {
513 0 3 if (usedspace > 0) {
517 0 0 if (len >= freespace) {
533 12 3 while (len >= LDNS_SHA256_BLOCK_LENGTH) {
540 3 0 if (len > 0) {
563 3 0 if (digest != (sha2_byte*)0) {
569 3 0 if (usedspace > 0) {
573 3 0 if (usedspace <= ldns_sha256_SHORT_BLOCK_LENGTH) {
577 0 0 if (usedspace < LDNS_SHA256_BLOCK_LENGTH) {
604 24 3 for (j = 0; j < 8; j++) {
631 0 0 if (context == (ldns_sha512_CTX*)0) {
769 0 0 } while (j < 16);
792 0 0 } while (j < 80);
813 0 0 if (len == 0) {
822 0 0 if (usedspace > 0) {
826 0 0 if (len >= freespace) {
829 0 0 ADDINC128(context->bitcount, freespace << 3);
836 0 0 ADDINC128(context->bitcount, len << 3);
842 0 0 while (len >= LDNS_SHA512_BLOCK_LENGTH) {
845 0 0 ADDINC128(context->bitcount, LDNS_SHA512_BLOCK_LENGTH << 3);
849 0 0 if (len > 0) {
852 0 0 ADDINC128(context->bitcount, len << 3);
868 0 0 if (usedspace > 0) {
872 0 0 if (usedspace <= ldns_sha512_SHORT_BLOCK_LENGTH) {
876 0 0 if (usedspace < LDNS_SHA512_BLOCK_LENGTH) {
908 0 0 if (digest != (sha2_byte*)0) {
916 0 0 for (j = 0; j < 8; j++) {
942 0 0 if (context == (ldns_sha384_CTX*)0) {
961 0 0 if (digest != (sha2_byte*)0) {
969 0 0 for (j = 0; j < 6; j++) {