| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/bf/bf_skey.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||
|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||
| 2 | void BF_set_key(BF_KEY *key, int len, const unsigned char *data) | - | ||||||
| 3 | { | - | ||||||
| 4 | int i; | - | ||||||
| 5 | unsigned int *p,ri,in[2]; | - | ||||||
| 6 | const unsigned char *d,*end; | - | ||||||
| 7 | - | |||||||
| 8 | - | |||||||
| 9 | memcpy(key,&bf_init,sizeof(BF_KEY)); | - | ||||||
| 10 | p=key->P; | - | ||||||
| 11 | - | |||||||
| 12 | if (len > ((16 +2)*4)
never executed: len=(16 +2)*4; | 0-79 | ||||||
| 13 | - | |||||||
| 14 | d=data; | - | ||||||
| 15 | end= &(data[len]); | - | ||||||
| 16 | for (i=0; i<(16 +2)
| 79-1422 | ||||||
| 17 | { | - | ||||||
| 18 | ri= *(d++); | - | ||||||
| 19 | if (d >= end
executed 41 times by 1 test: d=data;Executed by:
| 41-1381 | ||||||
| 20 | - | |||||||
| 21 | ri<<=8; | - | ||||||
| 22 | ri|= *(d++); | - | ||||||
| 23 | if (d >= end
executed 78 times by 1 test: d=data;Executed by:
| 78-1344 | ||||||
| 24 | - | |||||||
| 25 | ri<<=8; | - | ||||||
| 26 | ri|= *(d++); | - | ||||||
| 27 | if (d >= end
executed 41 times by 1 test: d=data;Executed by:
| 41-1381 | ||||||
| 28 | - | |||||||
| 29 | ri<<=8; | - | ||||||
| 30 | ri|= *(d++); | - | ||||||
| 31 | if (d >= end
executed 494 times by 2 tests: d=data;Executed by:
| 494-928 | ||||||
| 32 | - | |||||||
| 33 | p[i]^=ri; | - | ||||||
| 34 | } executed 1422 times by 2 tests: end of blockExecuted by:
| 1422 | ||||||
| 35 | - | |||||||
| 36 | in[0]=0L; | - | ||||||
| 37 | in[1]=0L; | - | ||||||
| 38 | for (i=0; i<(16 +2)
| 79-711 | ||||||
| 39 | { | - | ||||||
| 40 | BF_encrypt(in,key); | - | ||||||
| 41 | p[i ]=in[0]; | - | ||||||
| 42 | p[i+1]=in[1]; | - | ||||||
| 43 | } executed 711 times by 2 tests: end of blockExecuted by:
| 711 | ||||||
| 44 | - | |||||||
| 45 | p=key->S; | - | ||||||
| 46 | for (i=0; i<4*256
| 79-40448 | ||||||
| 47 | { | - | ||||||
| 48 | BF_encrypt(in,key); | - | ||||||
| 49 | p[i ]=in[0]; | - | ||||||
| 50 | p[i+1]=in[1]; | - | ||||||
| 51 | } executed 40448 times by 2 tests: end of blockExecuted by:
| 40448 | ||||||
| 52 | } executed 79 times by 2 tests: end of blockExecuted by:
| 79 | ||||||
| Switch to Source code | Preprocessed file |