Branch Coverage

src/ed25519/sha512.c
Criterion Covered Total %
branch 33 52 63.4


line true false branch
97 40 5 for (i = 0; i < 8; i++) {
102 80 5 for (i = 0; i < 16; i++) {
107 320 5 for (i = 16; i < 80; i++) {
118 50 5 for (i = 0; i < 80; i += 8) {
134 40 5 for (i = 0; i < 8; i++) {
148 0 5 if (md == NULL) return 1;
176 0 9 if (md == NULL) return 1;
177 0 9 if (in == NULL) return 1;
178 0 9 if (md->curlen > sizeof(md->buf)) {
181 9 9 while (inlen > 0) {
182 5 4 if (md->curlen == 0 && inlen >= 128) {
0 5 if (md->curlen == 0 && inlen >= 128) {
183 0 0 if ((err = sha512_compress (md, (unsigned char *)in)) != 0) {
192 314 9 for (i = 0; i < n; i++) {
200 0 9 if (md->curlen == 128) {
201 0 0 if ((err = sha512_compress (md, md->buf)) != 0) {
222 0 5 if (md == NULL) return 1;
223 0 5 if (out == NULL) return 1;
225 0 5 if (md->curlen >= sizeof(md->buf)) {
239 0 5 if (md->curlen > 112) {
240 0 0 while (md->curlen < 128) {
251 281 5 while (md->curlen < 120) {
260 40 5 for (i = 0; i < 8; i++) {
271 0 2 if ((ret = sha512_init(&ctx))) return ret;
272 0 2 if ((ret = sha512_update(&ctx, message, message_len))) return ret;
273 0 2 if ((ret = sha512_final(&ctx, out))) return ret;