| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/des/ecb_enc.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||
|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||
| 2 | const char *DES_options(void) | - | ||||||
| 3 | { | - | ||||||
| 4 | static int init=1; | - | ||||||
| 5 | static char buf[32]; | - | ||||||
| 6 | - | |||||||
| 7 | if (init
| 0 | ||||||
| 8 | { | - | ||||||
| 9 | const char *ptr,*unroll,*risc,*size; | - | ||||||
| 10 | - | |||||||
| 11 | - | |||||||
| 12 | - | |||||||
| 13 | - | |||||||
| 14 | ptr="idx"; | - | ||||||
| 15 | risc="cisc"; | - | ||||||
| 16 | - | |||||||
| 17 | - | |||||||
| 18 | unroll="16"; | - | ||||||
| 19 | - | |||||||
| 20 | - | |||||||
| 21 | - | |||||||
| 22 | if (sizeof(unsigned int) != sizeof(long)
| 0 | ||||||
| 23 | size="int"; never executed: size="int"; | 0 | ||||||
| 24 | else | - | ||||||
| 25 | size="long"; never executed: size="long"; | 0 | ||||||
| 26 | snprintf(buf,sizeof buf,"des(%s,%s,%s,%s)",ptr,risc,unroll, | - | ||||||
| 27 | size); | - | ||||||
| 28 | init=0; | - | ||||||
| 29 | } never executed: end of block | 0 | ||||||
| 30 | return never executed: (buf);return(buf);never executed: return(buf); | 0 | ||||||
| 31 | } | - | ||||||
| 32 | - | |||||||
| 33 | - | |||||||
| 34 | void DES_ecb_encrypt(const_DES_cblock *input, DES_cblock *output, | - | ||||||
| 35 | DES_key_schedule *ks, int enc) | - | ||||||
| 36 | { | - | ||||||
| 37 | unsigned int l; | - | ||||||
| 38 | unsigned int ll[2]; | - | ||||||
| 39 | const unsigned char *in = &(*input)[0]; | - | ||||||
| 40 | unsigned char *out = &(*output)[0]; | - | ||||||
| 41 | - | |||||||
| 42 | (l =((unsigned int)(*((in)++))) , l|=((unsigned int)(*((in)++)))<< 8L, l|=((unsigned int)(*((in)++)))<<16L, l|=((unsigned int)(*((in)++)))<<24L); ll[0]=l; | - | ||||||
| 43 | (l =((unsigned int)(*((in)++))) , l|=((unsigned int)(*((in)++)))<< 8L, l|=((unsigned int)(*((in)++)))<<16L, l|=((unsigned int)(*((in)++)))<<24L); ll[1]=l; | - | ||||||
| 44 | DES_encrypt1(ll,ks,enc); | - | ||||||
| 45 | l=ll[0]; (*((out)++)=(unsigned char)(((l) )&0xff), *((out)++)=(unsigned char)(((l)>> 8L)&0xff), *((out)++)=(unsigned char)(((l)>>16L)&0xff), *((out)++)=(unsigned char)(((l)>>24L)&0xff)); | - | ||||||
| 46 | l=ll[1]; (*((out)++)=(unsigned char)(((l) )&0xff), *((out)++)=(unsigned char)(((l)>> 8L)&0xff), *((out)++)=(unsigned char)(((l)>>16L)&0xff), *((out)++)=(unsigned char)(((l)>>24L)&0xff)); | - | ||||||
| 47 | l=ll[0]=ll[1]=0; | - | ||||||
| 48 | } executed 530 times by 3 tests: end of blockExecuted by:
| 530 | ||||||
| Switch to Source code | Preprocessed file |