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