Branch Coverage

ed25519/src/sha512.c
Criterion Covered Total %
branch 40 52 76.9


line true false branch
97 70232 8779 for (i = 0; i < 8; i++) {
102 140464 8779 for (i = 0; i < 16; i++) {
107 561856 8779 for (i = 16; i < 80; i++) {
118 87790 8779 for (i = 0; i < 80; i += 8) {
134 70232 8779 for (i = 0; i < 8; i++) {
148 0 6526 if (md == NULL) return 1;
176 0 14346 if (md == NULL) return 1;
177 0 14346 if (in == NULL) return 1;
178 0 14346 if (md->curlen > sizeof(md->buf)) {
181 15822 14346 while (inlen > 0) {
182 8092 7730 if (md->curlen == 0 && inlen >= 128) {
405 7687 if (md->curlen == 0 && inlen >= 128) {
183 0 405 if ((err = sha512_compress (md, (unsigned char *)in)) != 0) {
192 567524 15417 for (i = 0; i < n; i++) {
200 1177 14240 if (md->curlen == 128) {
201 0 1177 if ((err = sha512_compress (md, md->buf)) != 0) {
222 0 6526 if (md == NULL) return 1;
223 0 6526 if (out == NULL) return 1;
225 0 6526 if (md->curlen >= sizeof(md->buf)) {
239 671 5855 if (md->curlen > 112) {
240 5086 671 while (md->curlen < 128) {
251 440528 6526 while (md->curlen < 120) {
260 52208 6526 for (i = 0; i < 8; i++) {
271 0 1834 if ((ret = sha512_init(&ctx))) return ret;
272 0 1834 if ((ret = sha512_update(&ctx, message, message_len))) return ret;
273 0 1834 if ((ret = sha512_final(&ctx, out))) return ret;