Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/evp/e_rc4.c |
Switch to Source code | Preprocessed file |
Line | Source | Count |
---|---|---|
1 | - | |
2 | - | |
3 | - | |
4 | - | |
5 | - | |
6 | - | |
7 | - | |
8 | - | |
9 | - | |
10 | - | |
11 | typedef struct { | - |
12 | RC4_KEY ks; | - |
13 | } EVP_RC4_KEY; | - |
14 | - | |
15 | - | |
16 | - | |
17 | static int rc4_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | - |
18 | const unsigned char *iv, int enc); | - |
19 | static int rc4_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | - |
20 | const unsigned char *in, size_t inl); | - |
21 | - | |
22 | static const EVP_CIPHER r4_cipher = { | - |
23 | 5, | - |
24 | 1, 16, 0, | - |
25 | 0x8, | - |
26 | rc4_init_key, | - |
27 | rc4_cipher, | - |
28 | - | |
29 | ((void *)0) | - |
30 | , | - |
31 | sizeof(EVP_RC4_KEY), | - |
32 | - | |
33 | ((void *)0) | - |
34 | , | - |
35 | - | |
36 | ((void *)0) | - |
37 | , | - |
38 | - | |
39 | ((void *)0) | - |
40 | , | - |
41 | - | |
42 | ((void *)0) | - |
43 | - | |
44 | }; | - |
45 | - | |
46 | static const EVP_CIPHER r4_40_cipher = { | - |
47 | 97, | - |
48 | 1, 5 , 0, | - |
49 | 0x8, | - |
50 | rc4_init_key, | - |
51 | rc4_cipher, | - |
52 | - | |
53 | ((void *)0) | - |
54 | , | - |
55 | sizeof(EVP_RC4_KEY), | - |
56 | - | |
57 | ((void *)0) | - |
58 | , | - |
59 | - | |
60 | ((void *)0) | - |
61 | , | - |
62 | - | |
63 | ((void *)0) | - |
64 | , | - |
65 | - | |
66 | ((void *)0) | - |
67 | - | |
68 | }; | - |
69 | - | |
70 | const EVP_CIPHER * | - |
71 | EVP_rc4(void) | - |
72 | { | - |
73 | return executed 625 times by 33 tests: (&r4_cipher);return (&r4_cipher); Executed by:
executed 625 times by 33 tests: return (&r4_cipher); Executed by:
| 625 |
74 | } | - |
75 | - | |
76 | const EVP_CIPHER * | - |
77 | EVP_rc4_40(void) | - |
78 | { | - |
79 | return executed 292 times by 33 tests: (&r4_40_cipher);return (&r4_40_cipher); Executed by:
executed 292 times by 33 tests: return (&r4_40_cipher); Executed by:
| 292 |
80 | } | - |
81 | - | |
82 | static int | - |
83 | rc4_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | - |
84 | const unsigned char *iv, int enc) | - |
85 | { | - |
86 | RC4_set_key(&((EVP_RC4_KEY *)(ctx)->cipher_data)->ks, EVP_CIPHER_CTX_key_length(ctx), key); | - |
87 | return executed 20 times by 2 tests: 1;return 1; Executed by:
executed 20 times by 2 tests: return 1; Executed by:
| 20 |
88 | } | - |
89 | - | |
90 | static int | - |
91 | rc4_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | - |
92 | const unsigned char *in, size_t inl) | - |
93 | { | - |
94 | RC4(&((EVP_RC4_KEY *)(ctx)->cipher_data)->ks, inl, in, out); | - |
95 | return executed 20 times by 2 tests: 1;return 1; Executed by:
executed 20 times by 2 tests: return 1; Executed by:
| 20 |
96 | } | - |
Switch to Source code | Preprocessed file |