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