OpenCoverage

bf_ofb64.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/bf/bf_ofb64.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7void BF_ofb64_encrypt(const unsigned char *in, unsigned char *out,-
8 long length, const BF_KEY *schedule,-
9 unsigned char *ivec, int *num)-
10{-
11 register unsigned int v0, v1, t;-
12 register int n = *num;-
13 register long l = length;-
14 unsigned char d[8];-
15 register char *dp;-
16 unsigned int ti[2];-
17 unsigned char *iv;-
18 int save = 0;-
19-
20 iv = (unsigned char *)ivec;-
21 (v0 =((unsigned long)(*((iv)++)))<<24L, v0|=((unsigned long)(*((iv)++)))<<16L, v0|=((unsigned long)(*((iv)++)))<< 8L, v0|=((unsigned long)(*((iv)++))));-
22 (v1 =((unsigned long)(*((iv)++)))<<24L, v1|=((unsigned long)(*((iv)++)))<<16L, v1|=((unsigned long)(*((iv)++)))<< 8L, v1|=((unsigned long)(*((iv)++))));-
23 ti[0] = v0;-
24 ti[1] = v1;-
25 dp = (char *)d;-
26 (*((dp)++)=(unsigned char)(((v0)>>24L)&0xff), *((dp)++)=(unsigned char)(((v0)>>16L)&0xff), *((dp)++)=(unsigned char)(((v0)>> 8L)&0xff), *((dp)++)=(unsigned char)(((v0) )&0xff));-
27 (*((dp)++)=(unsigned char)(((v1)>>24L)&0xff), *((dp)++)=(unsigned char)(((v1)>>16L)&0xff), *((dp)++)=(unsigned char)(((v1)>> 8L)&0xff), *((dp)++)=(unsigned char)(((v1) )&0xff));-
28 while (l--
l--Description
TRUEevaluated 12614 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 74 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
74-12614
29 if (n == 0
n == 0Description
TRUEevaluated 1578 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 11036 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
1578-11036
30 BF_encrypt((unsigned int *)ti, schedule);-
31 dp = (char *)d;-
32 t = ti[0];-
33 (*((dp)++)=(unsigned char)(((t)>>24L)&0xff), *((dp)++)=(unsigned char)(((t)>>16L)&0xff), *((dp)++)=(unsigned char)(((t)>> 8L)&0xff), *((dp)++)=(unsigned char)(((t) )&0xff));-
34 t = ti[1];-
35 (*((dp)++)=(unsigned char)(((t)>>24L)&0xff), *((dp)++)=(unsigned char)(((t)>>16L)&0xff), *((dp)++)=(unsigned char)(((t)>> 8L)&0xff), *((dp)++)=(unsigned char)(((t) )&0xff));-
36 save++;-
37 }
executed 1578 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
1578
38 *(out++) = *(in++) ^ d[n];-
39 n = (n + 1) & 0x07;-
40 }
executed 12614 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
12614
41 if (save
saveDescription
TRUEevaluated 74 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-74
42 v0 = ti[0];-
43 v1 = ti[1];-
44 iv = (unsigned char *)ivec;-
45 (*((iv)++)=(unsigned char)(((v0)>>24L)&0xff), *((iv)++)=(unsigned char)(((v0)>>16L)&0xff), *((iv)++)=(unsigned char)(((v0)>> 8L)&0xff), *((iv)++)=(unsigned char)(((v0) )&0xff));-
46 (*((iv)++)=(unsigned char)(((v1)>>24L)&0xff), *((iv)++)=(unsigned char)(((v1)>>16L)&0xff), *((iv)++)=(unsigned char)(((v1)>> 8L)&0xff), *((iv)++)=(unsigned char)(((v1) )&0xff));-
47 }
executed 74 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
74
48 t = v0 = v1 = ti[0] = ti[1] = 0;-
49 *num = n;-
50}
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