| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/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 | memcpy(key, &bf_init, sizeof(BF_KEY)); | - | ||||||
| 9 | p = key->P; | - | ||||||
| 10 | - | |||||||
| 11 | if (len > ((16 + 2) * 4)
| 0-95 | ||||||
| 12 | len = (16 + 2) * 4; never executed: len = (16 + 2) * 4; | 0 | ||||||
| 13 | - | |||||||
| 14 | d = data; | - | ||||||
| 15 | end = &(data[len]); | - | ||||||
| 16 | for (i = 0; i < (16 + 2)
| 95-1710 | ||||||
| 17 | ri = *(d++); | - | ||||||
| 18 | if (d >= end
| 41-1669 | ||||||
| 19 | d = data; executed 41 times by 1 test: d = data;Executed by:
| 41 | ||||||
| 20 | - | |||||||
| 21 | ri <<= 8; | - | ||||||
| 22 | ri |= *(d++); | - | ||||||
| 23 | if (d >= end
| 78-1632 | ||||||
| 24 | d = data; executed 78 times by 1 test: d = data;Executed by:
| 78 | ||||||
| 25 | - | |||||||
| 26 | ri <<= 8; | - | ||||||
| 27 | ri |= *(d++); | - | ||||||
| 28 | if (d >= end
| 41-1669 | ||||||
| 29 | d = data; executed 41 times by 1 test: d = data;Executed by:
| 41 | ||||||
| 30 | - | |||||||
| 31 | ri <<= 8; | - | ||||||
| 32 | ri |= *(d++); | - | ||||||
| 33 | if (d >= end
| 558-1152 | ||||||
| 34 | d = data; executed 558 times by 1 test: d = data;Executed by:
| 558 | ||||||
| 35 | - | |||||||
| 36 | p[i] ^= ri; | - | ||||||
| 37 | } executed 1710 times by 1 test: end of blockExecuted by:
| 1710 | ||||||
| 38 | - | |||||||
| 39 | in[0] = 0L; | - | ||||||
| 40 | in[1] = 0L; | - | ||||||
| 41 | for (i = 0; i < (16 + 2)
| 95-855 | ||||||
| 42 | BF_encrypt(in, key); | - | ||||||
| 43 | p[i] = in[0]; | - | ||||||
| 44 | p[i + 1] = in[1]; | - | ||||||
| 45 | } executed 855 times by 1 test: end of blockExecuted by:
| 855 | ||||||
| 46 | - | |||||||
| 47 | p = key->S; | - | ||||||
| 48 | for (i = 0; i < 4 * 256
| 95-48640 | ||||||
| 49 | BF_encrypt(in, key); | - | ||||||
| 50 | p[i] = in[0]; | - | ||||||
| 51 | p[i + 1] = in[1]; | - | ||||||
| 52 | } executed 48640 times by 1 test: end of blockExecuted by:
| 48640 | ||||||
| 53 | } executed 95 times by 1 test: end of blockExecuted by:
| 95 | ||||||
| Switch to Source code | Preprocessed file |