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