Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/des/ecb_enc.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | const char *DES_options(void) | - | ||||||
5 | { | - | ||||||
6 | static int init = 1; | - | ||||||
7 | static char buf[12]; | - | ||||||
8 | - | |||||||
9 | if (init
| 0 | ||||||
10 | if (sizeof(DES_LONG) != sizeof(long)
| 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: buf;return buf; never executed: return buf; | 0 | ||||||
17 | } | - | ||||||
18 | - | |||||||
19 | void 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:
| 1808 | ||||||
Switch to Source code | Preprocessed file |