| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/des/cfb64enc.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||
|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||
| 2 | - | |||||||
| 3 | - | |||||||
| 4 | - | |||||||
| 5 | - | |||||||
| 6 | - | |||||||
| 7 | - | |||||||
| 8 | void DES_cfb64_encrypt(const unsigned char *in, unsigned char *out, | - | ||||||
| 9 | long length, DES_key_schedule *schedule, | - | ||||||
| 10 | DES_cblock *ivec, int *num, int enc) | - | ||||||
| 11 | { | - | ||||||
| 12 | register DES_LONG v0, v1; | - | ||||||
| 13 | register long l = length; | - | ||||||
| 14 | register int n = *num; | - | ||||||
| 15 | DES_LONG ti[2]; | - | ||||||
| 16 | unsigned char *iv, c, cc; | - | ||||||
| 17 | - | |||||||
| 18 | iv = &(*ivec)[0]; | - | ||||||
| 19 | if (enc
| 31-43 | ||||||
| 20 | while (l--
| 43-6302 | ||||||
| 21 | if (n == 0
| 788-5514 | ||||||
| 22 | (v0 =((DES_LONG)(*((iv)++))) , v0|=((DES_LONG)(*((iv)++)))<< 8L, v0|=((DES_LONG)(*((iv)++)))<<16L, v0|=((DES_LONG)(*((iv)++)))<<24L); | - | ||||||
| 23 | ti[0] = v0; | - | ||||||
| 24 | (v1 =((DES_LONG)(*((iv)++))) , v1|=((DES_LONG)(*((iv)++)))<< 8L, v1|=((DES_LONG)(*((iv)++)))<<16L, v1|=((DES_LONG)(*((iv)++)))<<24L); | - | ||||||
| 25 | ti[1] = v1; | - | ||||||
| 26 | DES_encrypt1(ti, schedule, 1); | - | ||||||
| 27 | iv = &(*ivec)[0]; | - | ||||||
| 28 | v0 = ti[0]; | - | ||||||
| 29 | (*((iv)++)=(unsigned char)(((v0) )&0xff), *((iv)++)=(unsigned char)(((v0)>> 8L)&0xff), *((iv)++)=(unsigned char)(((v0)>>16L)&0xff), *((iv)++)=(unsigned char)(((v0)>>24L)&0xff)); | - | ||||||
| 30 | v0 = ti[1]; | - | ||||||
| 31 | (*((iv)++)=(unsigned char)(((v0) )&0xff), *((iv)++)=(unsigned char)(((v0)>> 8L)&0xff), *((iv)++)=(unsigned char)(((v0)>>16L)&0xff), *((iv)++)=(unsigned char)(((v0)>>24L)&0xff)); | - | ||||||
| 32 | iv = &(*ivec)[0]; | - | ||||||
| 33 | } executed 788 times by 1 test: end of blockExecuted by:
| 788 | ||||||
| 34 | c = *(in++) ^ iv[n]; | - | ||||||
| 35 | *(out++) = c; | - | ||||||
| 36 | iv[n] = c; | - | ||||||
| 37 | n = (n + 1) & 0x07; | - | ||||||
| 38 | } executed 6302 times by 1 test: end of blockExecuted by:
| 6302 | ||||||
| 39 | } executed 43 times by 1 test: else {end of blockExecuted by:
| 43 | ||||||
| 40 | while (l--
| 31-6302 | ||||||
| 41 | if (n == 0
| 788-5514 | ||||||
| 42 | (v0 =((DES_LONG)(*((iv)++))) , v0|=((DES_LONG)(*((iv)++)))<< 8L, v0|=((DES_LONG)(*((iv)++)))<<16L, v0|=((DES_LONG)(*((iv)++)))<<24L); | - | ||||||
| 43 | ti[0] = v0; | - | ||||||
| 44 | (v1 =((DES_LONG)(*((iv)++))) , v1|=((DES_LONG)(*((iv)++)))<< 8L, v1|=((DES_LONG)(*((iv)++)))<<16L, v1|=((DES_LONG)(*((iv)++)))<<24L); | - | ||||||
| 45 | ti[1] = v1; | - | ||||||
| 46 | DES_encrypt1(ti, schedule, 1); | - | ||||||
| 47 | iv = &(*ivec)[0]; | - | ||||||
| 48 | v0 = ti[0]; | - | ||||||
| 49 | (*((iv)++)=(unsigned char)(((v0) )&0xff), *((iv)++)=(unsigned char)(((v0)>> 8L)&0xff), *((iv)++)=(unsigned char)(((v0)>>16L)&0xff), *((iv)++)=(unsigned char)(((v0)>>24L)&0xff)); | - | ||||||
| 50 | v0 = ti[1]; | - | ||||||
| 51 | (*((iv)++)=(unsigned char)(((v0) )&0xff), *((iv)++)=(unsigned char)(((v0)>> 8L)&0xff), *((iv)++)=(unsigned char)(((v0)>>16L)&0xff), *((iv)++)=(unsigned char)(((v0)>>24L)&0xff)); | - | ||||||
| 52 | iv = &(*ivec)[0]; | - | ||||||
| 53 | } executed 788 times by 1 test: end of blockExecuted by:
| 788 | ||||||
| 54 | cc = *(in++); | - | ||||||
| 55 | c = iv[n]; | - | ||||||
| 56 | iv[n] = cc; | - | ||||||
| 57 | *(out++) = c ^ cc; | - | ||||||
| 58 | n = (n + 1) & 0x07; | - | ||||||
| 59 | } executed 6302 times by 1 test: end of blockExecuted by:
| 6302 | ||||||
| 60 | } executed 31 times by 1 test: end of blockExecuted by:
| 31 | ||||||
| 61 | v0 = v1 = ti[0] = ti[1] = c = cc = 0; | - | ||||||
| 62 | *num = n; | - | ||||||
| 63 | } executed 74 times by 1 test: end of blockExecuted by:
| 74 | ||||||
| Switch to Source code | Preprocessed file |