| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/modes/ofb128.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||
| 2 | - | |||||||||||||
| 3 | - | |||||||||||||
| 4 | - | |||||||||||||
| 5 | - | |||||||||||||
| 6 | - | |||||||||||||
| 7 | - | |||||||||||||
| 8 | void CRYPTO_ofb128_encrypt(const unsigned char *in, unsigned char *out, | - | ||||||||||||
| 9 | size_t len, const void *key, | - | ||||||||||||
| 10 | unsigned char ivec[16], int *num, block128_f block) | - | ||||||||||||
| 11 | { | - | ||||||||||||
| 12 | unsigned int n; | - | ||||||||||||
| 13 | size_t l = 0; | - | ||||||||||||
| 14 | - | |||||||||||||
| 15 | n = *num; | - | ||||||||||||
| 16 | - | |||||||||||||
| 17 | - | |||||||||||||
| 18 | if (16 % sizeof(size_t) == 0
| 0-20114 | ||||||||||||
| 19 | do { | - | ||||||||||||
| 20 | while (n
| 298-69406 | ||||||||||||
| 21 | *(out++) = *(in++) ^ ivec[n]; | - | ||||||||||||
| 22 | --len; | - | ||||||||||||
| 23 | n = (n + 1) % 16; | - | ||||||||||||
| 24 | } executed 69108 times by 1 test: end of blockExecuted by:
| 69108 | ||||||||||||
| 25 | - | |||||||||||||
| 26 | - | |||||||||||||
| 27 | - | |||||||||||||
| 28 | - | |||||||||||||
| 29 | - | |||||||||||||
| 30 | while (len >= 16
| 20114-391304 | ||||||||||||
| 31 | (*block) (ivec, ivec, key); | - | ||||||||||||
| 32 | for (; n < 16
| 391304-782608 | ||||||||||||
| 33 | *( executed 782608 times by 1 test: size_t *)(out + n) =*(size_t *)(out + n) = *(size_t *)(in + n) ^ *(size_t *)(ivec + n);Executed by:
executed 782608 times by 1 test: *(size_t *)(out + n) = *(size_t *)(in + n) ^ *(size_t *)(ivec + n);Executed by:
| 782608 | ||||||||||||
| 34 | *(size_t *)(in + n) ^ *(size_t *)(ivec + n); executed 782608 times by 1 test: *(size_t *)(out + n) = *(size_t *)(in + n) ^ *(size_t *)(ivec + n);Executed by:
| 782608 | ||||||||||||
| 35 | len -= 16; | - | ||||||||||||
| 36 | out += 16; | - | ||||||||||||
| 37 | in += 16; | - | ||||||||||||
| 38 | n = 0; | - | ||||||||||||
| 39 | } executed 391304 times by 1 test: end of blockExecuted by:
| 391304 | ||||||||||||
| 40 | if (len
| 8406-11708 | ||||||||||||
| 41 | (*block) (ivec, ivec, key); | - | ||||||||||||
| 42 | while (len--
| 8406-65192 | ||||||||||||
| 43 | out[n] = in[n] ^ ivec[n]; | - | ||||||||||||
| 44 | ++n; | - | ||||||||||||
| 45 | } executed 65192 times by 1 test: end of blockExecuted by:
| 65192 | ||||||||||||
| 46 | } executed 8406 times by 1 test: end of blockExecuted by:
| 8406 | ||||||||||||
| 47 | *num = n; | - | ||||||||||||
| 48 | return; executed 20114 times by 1 test: return;Executed by:
| 20114 | ||||||||||||
| 49 | } while (0); | - | ||||||||||||
| 50 | } never executed: end of block | 0 | ||||||||||||
| 51 | - | |||||||||||||
| 52 | - | |||||||||||||
| 53 | while (l < len
| 0 | ||||||||||||
| 54 | if (n == 0
| 0 | ||||||||||||
| 55 | (*block) (ivec, ivec, key); | - | ||||||||||||
| 56 | } never executed: end of block | 0 | ||||||||||||
| 57 | out[l] = in[l] ^ ivec[n]; | - | ||||||||||||
| 58 | ++l; | - | ||||||||||||
| 59 | n = (n + 1) % 16; | - | ||||||||||||
| 60 | } never executed: end of block | 0 | ||||||||||||
| 61 | - | |||||||||||||
| 62 | *num = n; | - | ||||||||||||
| 63 | } never executed: end of block | 0 | ||||||||||||
| Switch to Source code | Preprocessed file |