OpenCoverage

bf_cfb64.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/bf/bf_cfb64.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8void BF_cfb64_encrypt(const unsigned char *in, unsigned char *out,-
9 long length, const BF_KEY *schedule,-
10 unsigned char *ivec, int *num, int encrypt)-
11{-
12 register unsigned int v0, v1, t;-
13 register int n = *num;-
14 register long l = length;-
15 unsigned int 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 6307 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 43 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
43-6307
21 if (n == 0
n == 0Description
TRUEevaluated 789 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 5518 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
789-5518
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 BF_encrypt((unsigned int *)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 789 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
789
34 c = *(in++) ^ iv[n];-
35 *(out++) = c;-
36 iv[n] = c;-
37 n = (n + 1) & 0x07;-
38 }
executed 6307 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
6307
39 }
executed 43 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else {
43
40 while (l--
l--Description
TRUEevaluated 6307 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 31 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
31-6307
41 if (n == 0
n == 0Description
TRUEevaluated 789 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 5518 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
789-5518
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 BF_encrypt((unsigned int *)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 789 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
789
54 cc = *(in++);-
55 c = iv[n];-
56 iv[n] = cc;-
57 *(out++) = c ^ cc;-
58 n = (n + 1) & 0x07;-
59 }
executed 6307 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
6307
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