Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/des/qud_cksm.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | DES_LONG DES_quad_cksum(const unsigned char *input, DES_cblock output[], | - | ||||||||||||||||||||||||
2 | long length, int out_count, DES_cblock *seed) | - | ||||||||||||||||||||||||
3 | { | - | ||||||||||||||||||||||||
4 | DES_LONG z0, z1, t0, t1; | - | ||||||||||||||||||||||||
5 | int i; | - | ||||||||||||||||||||||||
6 | long l; | - | ||||||||||||||||||||||||
7 | const unsigned char *cp; | - | ||||||||||||||||||||||||
8 | DES_LONG *lp; | - | ||||||||||||||||||||||||
9 | - | |||||||||||||||||||||||||
10 | if (out_count < 1
| 0-1 | ||||||||||||||||||||||||
11 | out_count = 1; never executed: out_count = 1; | 0 | ||||||||||||||||||||||||
12 | lp = (DES_LONG *)&(output[0])[0]; | - | ||||||||||||||||||||||||
13 | - | |||||||||||||||||||||||||
14 | z0 = (((DES_LONG)((*seed)[0]))) | (((DES_LONG)((*seed)[1]))<<8) | (((DES_LONG)((*seed)[2]))<<16) | | - | ||||||||||||||||||||||||
15 | (((DES_LONG)((*seed)[3]))<<24); | - | ||||||||||||||||||||||||
16 | z1 = (((DES_LONG)((*seed)[4]))) | (((DES_LONG)((*seed)[5]))<<8) | (((DES_LONG)((*seed)[6]))<<16) | | - | ||||||||||||||||||||||||
17 | (((DES_LONG)((*seed)[7]))<<24); | - | ||||||||||||||||||||||||
18 | - | |||||||||||||||||||||||||
19 | for (i = 0; ((
| 0-3 | ||||||||||||||||||||||||
20 | cp = input; | - | ||||||||||||||||||||||||
21 | l = length; | - | ||||||||||||||||||||||||
22 | while (l > 0
| 2-28 | ||||||||||||||||||||||||
23 | if (l > 1
| 0-28 | ||||||||||||||||||||||||
24 | t0 = (DES_LONG)(*(cp++)); | - | ||||||||||||||||||||||||
25 | t0 |= (DES_LONG)(((DES_LONG)(*(cp++)))<<8); | - | ||||||||||||||||||||||||
26 | l--; | - | ||||||||||||||||||||||||
27 | } executed 28 times by 1 test: elseend of block Executed by:
| 28 | ||||||||||||||||||||||||
28 | t0 = (DES_LONG)(*(cp++)); never executed: t0 = (DES_LONG)(*(cp++)); | 0 | ||||||||||||||||||||||||
29 | l--; | - | ||||||||||||||||||||||||
30 | - | |||||||||||||||||||||||||
31 | t0 += z0; | - | ||||||||||||||||||||||||
32 | t0 &= 0xffffffffL; | - | ||||||||||||||||||||||||
33 | t1 = z1; | - | ||||||||||||||||||||||||
34 | - | |||||||||||||||||||||||||
35 | z0 = ((((t0 * t0) & 0xffffffffL) + ((t1 * t1) & 0xffffffffL)) | - | ||||||||||||||||||||||||
36 | & 0xffffffffL) % 0x7fffffffL; | - | ||||||||||||||||||||||||
37 | z1 = ((t0 * ((t1 + ((DES_LONG)83653421L)) & 0xffffffffL)) & 0xffffffffL) % | - | ||||||||||||||||||||||||
38 | 0x7fffffffL; | - | ||||||||||||||||||||||||
39 | } executed 28 times by 1 test: end of block Executed by:
| 28 | ||||||||||||||||||||||||
40 | if (lp !=
| 0-2 | ||||||||||||||||||||||||
41 | ((void *)0)
| 0-2 | ||||||||||||||||||||||||
42 | ) { | - | ||||||||||||||||||||||||
43 | - | |||||||||||||||||||||||||
44 | - | |||||||||||||||||||||||||
45 | - | |||||||||||||||||||||||||
46 | - | |||||||||||||||||||||||||
47 | *lp++ = z0; | - | ||||||||||||||||||||||||
48 | *lp++ = z1; | - | ||||||||||||||||||||||||
49 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||||||||||||||
50 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||||||||||||||
51 | return executed 1 time by 1 test: z0;return z0; Executed by:
executed 1 time by 1 test: return z0; Executed by:
| 1 | ||||||||||||||||||||||||
52 | } | - | ||||||||||||||||||||||||
Switch to Source code | Preprocessed file |