* [including the GNU Public Licence.]
*/
-#ifndef OPENSSL_NO_RC4
-
#include <stdio.h>
#include "cryptlib.h"
+
+#ifndef OPENSSL_NO_RC4
+
#include <openssl/evp.h>
#include <openssl/objects.h>
#include <openssl/rc4.h>
typedef struct
{
- /* FIXME: what is the key for? */
- unsigned char key[EVP_RC4_KEY_SIZE];
RC4_KEY ks; /* working key */
} EVP_RC4_KEY;
static int rc4_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc)
{
- memcpy(&data(ctx)->key[0],key,EVP_CIPHER_CTX_key_length(ctx));
RC4_set_key(&data(ctx)->ks,EVP_CIPHER_CTX_key_length(ctx),
- data(ctx)->key);
+ key);
return 1;
}