OpenCoverage

ecb_enc.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/des/ecb_enc.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4const char *DES_options(void)-
5{-
6 static int init = 1;-
7 static char buf[12];-
8-
9 if (init
initDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
10 if (sizeof(DES_LONG) != sizeof(long)
sizeof(DES_LON...= sizeof(long)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
11 OPENSSL_strlcpy(buf, "des(int)", sizeof(buf));
never executed: OPENSSL_strlcpy(buf, "des(int)", sizeof(buf));
0
12 else-
13 OPENSSL_strlcpy(buf, "des(long)", sizeof(buf));
never executed: OPENSSL_strlcpy(buf, "des(long)", sizeof(buf));
0
14 init = 0;-
15 }
never executed: end of block
0
16 return
never executed: return buf;
buf;
never executed: return buf;
0
17}-
18-
19void DES_ecb_encrypt(const_DES_cblock *input, DES_cblock *output,-
20 DES_key_schedule *ks, int enc)-
21{-
22 register DES_LONG l;-
23 DES_LONG ll[2];-
24 const unsigned char *in = &(*input)[0];-
25 unsigned char *out = &(*output)[0];-
26-
27 (l =((DES_LONG)(*((in)++))) , l|=((DES_LONG)(*((in)++)))<< 8L, l|=((DES_LONG)(*((in)++)))<<16L, l|=((DES_LONG)(*((in)++)))<<24L);-
28 ll[0] = l;-
29 (l =((DES_LONG)(*((in)++))) , l|=((DES_LONG)(*((in)++)))<< 8L, l|=((DES_LONG)(*((in)++)))<<16L, l|=((DES_LONG)(*((in)++)))<<24L);-
30 ll[1] = l;-
31 DES_encrypt1(ll, ks, enc);-
32 l = ll[0];-
33 (*((out)++)=(unsigned char)(((l) )&0xff), *((out)++)=(unsigned char)(((l)>> 8L)&0xff), *((out)++)=(unsigned char)(((l)>>16L)&0xff), *((out)++)=(unsigned char)(((l)>>24L)&0xff));-
34 l = ll[1];-
35 (*((out)++)=(unsigned char)(((l) )&0xff), *((out)++)=(unsigned char)(((l)>> 8L)&0xff), *((out)++)=(unsigned char)(((l)>>16L)&0xff), *((out)++)=(unsigned char)(((l)>>24L)&0xff));-
36 l = ll[0] = ll[1] = 0;-
37}
executed 1808 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
1808
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2