Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/des/ofb64enc.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | - | |||||||
5 | - | |||||||
6 | - | |||||||
7 | void DES_ofb64_encrypt(register const unsigned char *in, | - | ||||||
8 | register unsigned char *out, long length, | - | ||||||
9 | DES_key_schedule *schedule, DES_cblock *ivec, int *num) | - | ||||||
10 | { | - | ||||||
11 | register DES_LONG v0, v1, t; | - | ||||||
12 | register int n = *num; | - | ||||||
13 | register long l = length; | - | ||||||
14 | DES_cblock d; | - | ||||||
15 | register unsigned char *dp; | - | ||||||
16 | DES_LONG ti[2]; | - | ||||||
17 | unsigned char *iv; | - | ||||||
18 | int save = 0; | - | ||||||
19 | - | |||||||
20 | iv = &(*ivec)[0]; | - | ||||||
21 | (v0 =((DES_LONG)(*((iv)++))) , v0|=((DES_LONG)(*((iv)++)))<< 8L, v0|=((DES_LONG)(*((iv)++)))<<16L, v0|=((DES_LONG)(*((iv)++)))<<24L); | - | ||||||
22 | (v1 =((DES_LONG)(*((iv)++))) , v1|=((DES_LONG)(*((iv)++)))<< 8L, v1|=((DES_LONG)(*((iv)++)))<<16L, v1|=((DES_LONG)(*((iv)++)))<<24L); | - | ||||||
23 | ti[0] = v0; | - | ||||||
24 | ti[1] = v1; | - | ||||||
25 | dp = d; | - | ||||||
26 | (*((dp)++)=(unsigned char)(((v0) )&0xff), *((dp)++)=(unsigned char)(((v0)>> 8L)&0xff), *((dp)++)=(unsigned char)(((v0)>>16L)&0xff), *((dp)++)=(unsigned char)(((v0)>>24L)&0xff)); | - | ||||||
27 | (*((dp)++)=(unsigned char)(((v1) )&0xff), *((dp)++)=(unsigned char)(((v1)>> 8L)&0xff), *((dp)++)=(unsigned char)(((v1)>>16L)&0xff), *((dp)++)=(unsigned char)(((v1)>>24L)&0xff)); | - | ||||||
28 | while (l--
| 95-12604 | ||||||
29 | if (n == 0
| 1576-11028 | ||||||
30 | DES_encrypt1(ti, schedule, 1); | - | ||||||
31 | dp = d; | - | ||||||
32 | t = ti[0]; | - | ||||||
33 | (*((dp)++)=(unsigned char)(((t) )&0xff), *((dp)++)=(unsigned char)(((t)>> 8L)&0xff), *((dp)++)=(unsigned char)(((t)>>16L)&0xff), *((dp)++)=(unsigned char)(((t)>>24L)&0xff)); | - | ||||||
34 | t = ti[1]; | - | ||||||
35 | (*((dp)++)=(unsigned char)(((t) )&0xff), *((dp)++)=(unsigned char)(((t)>> 8L)&0xff), *((dp)++)=(unsigned char)(((t)>>16L)&0xff), *((dp)++)=(unsigned char)(((t)>>24L)&0xff)); | - | ||||||
36 | save++; | - | ||||||
37 | } executed 1576 times by 1 test: end of block Executed by:
| 1576 | ||||||
38 | *(out++) = *(in++) ^ d[n]; | - | ||||||
39 | n = (n + 1) & 0x07; | - | ||||||
40 | } executed 12604 times by 1 test: end of block Executed by:
| 12604 | ||||||
41 | if (save
| 21-74 | ||||||
42 | v0 = ti[0]; | - | ||||||
43 | v1 = ti[1]; | - | ||||||
44 | iv = &(*ivec)[0]; | - | ||||||
45 | (*((iv)++)=(unsigned char)(((v0) )&0xff), *((iv)++)=(unsigned char)(((v0)>> 8L)&0xff), *((iv)++)=(unsigned char)(((v0)>>16L)&0xff), *((iv)++)=(unsigned char)(((v0)>>24L)&0xff)); | - | ||||||
46 | (*((iv)++)=(unsigned char)(((v1) )&0xff), *((iv)++)=(unsigned char)(((v1)>> 8L)&0xff), *((iv)++)=(unsigned char)(((v1)>>16L)&0xff), *((iv)++)=(unsigned char)(((v1)>>24L)&0xff)); | - | ||||||
47 | } executed 74 times by 1 test: end of block Executed by:
| 74 | ||||||
48 | t = v0 = v1 = ti[0] = ti[1] = 0; | - | ||||||
49 | *num = n; | - | ||||||
50 | } executed 95 times by 1 test: end of block Executed by:
| 95 | ||||||
Switch to Source code | Preprocessed file |