OpenCoverage

i_cfb64.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/idea/i_cfb64.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8void IDEA_cfb64_encrypt(const unsigned char *in, unsigned char *out,-
9 long length, IDEA_KEY_SCHEDULE *schedule,-
10 unsigned char *ivec, int *num, int encrypt)-
11{-
12 register unsigned long v0, v1, t;-
13 register int n = *num;-
14 register long l = length;-
15 unsigned long ti[2];-
16 unsigned char *iv, c, cc;-
17-
18 iv = (unsigned char *)ivec;-
19 if (encrypt
encryptDescription
TRUEevaluated 43 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 31 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
31-43
20 while (l--
l--Description
TRUEevaluated 6302 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 43 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
43-6302
21 if (n == 0
n == 0Description
TRUEevaluated 788 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 5514 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
788-5514
22 (v0 =((unsigned long)(*((iv)++)))<<24L, v0|=((unsigned long)(*((iv)++)))<<16L, v0|=((unsigned long)(*((iv)++)))<< 8L, v0|=((unsigned long)(*((iv)++))));-
23 ti[0] = v0;-
24 (v1 =((unsigned long)(*((iv)++)))<<24L, v1|=((unsigned long)(*((iv)++)))<<16L, v1|=((unsigned long)(*((iv)++)))<< 8L, v1|=((unsigned long)(*((iv)++))));-
25 ti[1] = v1;-
26 IDEA_encrypt((unsigned long *)ti, schedule);-
27 iv = (unsigned char *)ivec;-
28 t = ti[0];-
29 (*((iv)++)=(unsigned char)(((t)>>24L)&0xff), *((iv)++)=(unsigned char)(((t)>>16L)&0xff), *((iv)++)=(unsigned char)(((t)>> 8L)&0xff), *((iv)++)=(unsigned char)(((t) )&0xff));-
30 t = ti[1];-
31 (*((iv)++)=(unsigned char)(((t)>>24L)&0xff), *((iv)++)=(unsigned char)(((t)>>16L)&0xff), *((iv)++)=(unsigned char)(((t)>> 8L)&0xff), *((iv)++)=(unsigned char)(((t) )&0xff));-
32 iv = (unsigned char *)ivec;-
33 }
executed 788 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
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 block
Executed by:
  • libcrypto.so.1.1
6302
39 }
executed 43 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else {
43
40 while (l--
l--Description
TRUEevaluated 6302 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 31 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
31-6302
41 if (n == 0
n == 0Description
TRUEevaluated 788 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 5514 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
788-5514
42 (v0 =((unsigned long)(*((iv)++)))<<24L, v0|=((unsigned long)(*((iv)++)))<<16L, v0|=((unsigned long)(*((iv)++)))<< 8L, v0|=((unsigned long)(*((iv)++))));-
43 ti[0] = v0;-
44 (v1 =((unsigned long)(*((iv)++)))<<24L, v1|=((unsigned long)(*((iv)++)))<<16L, v1|=((unsigned long)(*((iv)++)))<< 8L, v1|=((unsigned long)(*((iv)++))));-
45 ti[1] = v1;-
46 IDEA_encrypt((unsigned long *)ti, schedule);-
47 iv = (unsigned char *)ivec;-
48 t = ti[0];-
49 (*((iv)++)=(unsigned char)(((t)>>24L)&0xff), *((iv)++)=(unsigned char)(((t)>>16L)&0xff), *((iv)++)=(unsigned char)(((t)>> 8L)&0xff), *((iv)++)=(unsigned char)(((t) )&0xff));-
50 t = ti[1];-
51 (*((iv)++)=(unsigned char)(((t)>>24L)&0xff), *((iv)++)=(unsigned char)(((t)>>16L)&0xff), *((iv)++)=(unsigned char)(((t)>> 8L)&0xff), *((iv)++)=(unsigned char)(((t) )&0xff));-
52 iv = (unsigned char *)ivec;-
53 }
executed 788 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
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 block
Executed by:
  • libcrypto.so.1.1
6302
60 }
executed 31 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
31
61 v0 = v1 = ti[0] = ti[1] = t = c = cc = 0;-
62 *num = n;-
63}
executed 74 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
74
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2