Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/include/internal/md32_common.h |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | int MD4_Update(MD4_CTX *c, const void *data_, size_t len) | - | ||||||||||||
2 | { | - | ||||||||||||
3 | const unsigned char *data = data_; | - | ||||||||||||
4 | unsigned char *p; | - | ||||||||||||
5 | unsigned int l; | - | ||||||||||||
6 | size_t n; | - | ||||||||||||
7 | - | |||||||||||||
8 | if (len == 0
| 612-1308473 | ||||||||||||
9 | return executed 612 times by 2 tests: 1;return 1; Executed by:
executed 612 times by 2 tests: return 1; Executed by:
| 612 | ||||||||||||
10 | - | |||||||||||||
11 | l = (c->Nl + (((unsigned int) len) << 3)) & 0xffffffffUL; | - | ||||||||||||
12 | if (l < c->Nl
| 0-1308473 | ||||||||||||
13 | c->Nh++; never executed: c->Nh++; | 0 | ||||||||||||
14 | c->Nh += (unsigned int) (len >> 29); | - | ||||||||||||
15 | - | |||||||||||||
16 | c->Nl = l; | - | ||||||||||||
17 | - | |||||||||||||
18 | n = c->num; | - | ||||||||||||
19 | if (n != 0
| 613278-695195 | ||||||||||||
20 | p = (unsigned char *)c->data; | - | ||||||||||||
21 | - | |||||||||||||
22 | if (len >= 64
| 38028-657167 | ||||||||||||
23 | memcpy(p + n, data, 64 - n); | - | ||||||||||||
24 | md4_block_data_order(c, p, 1); | - | ||||||||||||
25 | n = 64 - n; | - | ||||||||||||
26 | data += n; | - | ||||||||||||
27 | len -= n; | - | ||||||||||||
28 | c->num = 0; | - | ||||||||||||
29 | - | |||||||||||||
30 | - | |||||||||||||
31 | - | |||||||||||||
32 | - | |||||||||||||
33 | - | |||||||||||||
34 | - | |||||||||||||
35 | memset(p, 0, 64); | - | ||||||||||||
36 | } executed 287882 times by 2 tests: else {end of block Executed by:
| 287882 | ||||||||||||
37 | memcpy(p + n, data, len); | - | ||||||||||||
38 | c->num += (unsigned int)len; | - | ||||||||||||
39 | return executed 407313 times by 2 tests: 1;return 1; Executed by:
executed 407313 times by 2 tests: return 1; Executed by:
| 407313 | ||||||||||||
40 | } | - | ||||||||||||
41 | } | - | ||||||||||||
42 | - | |||||||||||||
43 | n = len / 64; | - | ||||||||||||
44 | if (n > 0
| 147219-753941 | ||||||||||||
45 | md4_block_data_order(c, data, n); | - | ||||||||||||
46 | n *= 64; | - | ||||||||||||
47 | data += n; | - | ||||||||||||
48 | len -= n; | - | ||||||||||||
49 | } executed 147219 times by 2 tests: end of block Executed by:
| 147219 | ||||||||||||
50 | - | |||||||||||||
51 | if (len != 0
| 75184-825976 | ||||||||||||
52 | p = (unsigned char *)c->data; | - | ||||||||||||
53 | c->num = (unsigned int)len; | - | ||||||||||||
54 | memcpy(p, data, len); | - | ||||||||||||
55 | } executed 825976 times by 2 tests: end of block Executed by:
| 825976 | ||||||||||||
56 | return executed 901160 times by 2 tests: 1;return 1; Executed by:
executed 901160 times by 2 tests: return 1; Executed by:
| 901160 | ||||||||||||
57 | } | - | ||||||||||||
58 | - | |||||||||||||
59 | void MD4_Transform(MD4_CTX *c, const unsigned char *data) | - | ||||||||||||
60 | { | - | ||||||||||||
61 | md4_block_data_order(c, data, 1); | - | ||||||||||||
62 | } executed 4138 times by 1 test: end of block Executed by:
| 4138 | ||||||||||||
63 | - | |||||||||||||
64 | int MD4_Final(unsigned char *md, MD4_CTX *c) | - | ||||||||||||
65 | { | - | ||||||||||||
66 | unsigned char *p = (unsigned char *)c->data; | - | ||||||||||||
67 | size_t n = c->num; | - | ||||||||||||
68 | - | |||||||||||||
69 | p[n] = 0x80; | - | ||||||||||||
70 | n++; | - | ||||||||||||
71 | - | |||||||||||||
72 | if (n > (64 - 8)
| 68500-506394 | ||||||||||||
73 | memset(p + n, 0, 64 - n); | - | ||||||||||||
74 | n = 0; | - | ||||||||||||
75 | md4_block_data_order(c, p, 1); | - | ||||||||||||
76 | } executed 68500 times by 1 test: end of block Executed by:
| 68500 | ||||||||||||
77 | memset(p + n, 0, 64 - 8 - n); | - | ||||||||||||
78 | - | |||||||||||||
79 | p += 64 - 8; | - | ||||||||||||
80 | - | |||||||||||||
81 | - | |||||||||||||
82 | - | |||||||||||||
83 | - | |||||||||||||
84 | (void)(*((p)++)=(unsigned char)(((c->Nl) )&0xff), *((p)++)=(unsigned char)(((c->Nl)>> 8)&0xff), *((p)++)=(unsigned char)(((c->Nl)>>16)&0xff), *((p)++)=(unsigned char)(((c->Nl)>>24)&0xff), c->Nl); | - | ||||||||||||
85 | (void)(*((p)++)=(unsigned char)(((c->Nh) )&0xff), *((p)++)=(unsigned char)(((c->Nh)>> 8)&0xff), *((p)++)=(unsigned char)(((c->Nh)>>16)&0xff), *((p)++)=(unsigned char)(((c->Nh)>>24)&0xff), c->Nh); | - | ||||||||||||
86 | - | |||||||||||||
87 | p -= 64; | - | ||||||||||||
88 | md4_block_data_order(c, p, 1); | - | ||||||||||||
89 | c->num = 0; | - | ||||||||||||
90 | OPENSSL_cleanse(p, 64); | - | ||||||||||||
91 | - | |||||||||||||
92 | - | |||||||||||||
93 | - | |||||||||||||
94 | - | |||||||||||||
95 | do { unsigned long ll; ll=(c)->A; (void)(*(((md))++)=(unsigned char)(((ll) )&0xff), *(((md))++)=(unsigned char)(((ll)>> 8)&0xff), *(((md))++)=(unsigned char)(((ll)>>16)&0xff), *(((md))++)=(unsigned char)(((ll)>>24)&0xff), ll); ll=(c)->B; (void)(*(((md))++)=(unsigned char)(((ll) )&0xff), *(((md))++)=(unsigned char)(((ll)>> 8)&0xff), *(((md))++)=(unsigned char)(((ll)>>16)&0xff), *(((md))++)=(unsigned char)(((ll)>>24)&0xff), ll); ll=(c)->C; (void)(*(((md))++)=(unsigned char)(((ll) )&0xff), *(((md))++)=(unsigned char)(((ll)>> 8)&0xff), *(((md))++)=(unsigned char)(((ll)>>16)&0xff), *(((md))++)=(unsigned char)(((ll)>>24)&0xff), ll); ll=(c)->D; (void)(*(((md))++)=(unsigned char)(((ll) )&0xff), *(((md))++)=(unsigned char)(((ll)>> 8)&0xff), *(((md))++)=(unsigned char)(((ll)>>16)&0xff), *(((md))++)=(unsigned char)(((ll)>>24)&0xff), ll); } while (0); | - | ||||||||||||
96 | - | |||||||||||||
97 | - | |||||||||||||
98 | return executed 574894 times by 2 tests: 1;return 1; Executed by:
executed 574894 times by 2 tests: return 1; Executed by:
| 574894 | ||||||||||||
99 | } | - | ||||||||||||
Switch to Source code | Preprocessed file |