Commit 9f77bb3a authored by Niels Möller's avatar Niels Möller

Renamed rc4 -> arcfour.

Rev: src/symmetric/Makefile.am.in:1.6
Rev: src/symmetric/arcfour.c:1.1
Rev: src/symmetric/include/arcfour.h:1.1
Rev: src/symmetric/include/rc4.h:1.5(DEAD)
Rev: src/symmetric/rc4.c:1.3(DEAD)
parent 0ce1de9e
...@@ -19,7 +19,7 @@ BUILT_SOURCES = desSmallFips.c desSmallCore.c desQuickFips.c desQuickCore.c \ ...@@ -19,7 +19,7 @@ BUILT_SOURCES = desSmallFips.c desSmallCore.c desQuickFips.c desQuickCore.c \
libsymmetric_a_SOURCES = desCode.h desKerb.c desUtil.c desQuick.c \ libsymmetric_a_SOURCES = desCode.h desKerb.c desUtil.c desQuick.c \
$(BUILT_SOURCES) \ $(BUILT_SOURCES) \
sha.c md5.c idea.c rc4.c cast.c blowfish.c sha.c md5.c idea.c arcfour.c cast.c blowfish.c
# Generate DES headers. # Generate DES headers.
$(des_headers): desdata $(des_headers): desdata
......
/* rc4.c /* arcfour.c
* *
*/ */
#include "crypto_types.h" #include "crypto_types.h"
#include <rc4.h> #include <arcfour.h>
#ifdef RCSID #ifdef RCSID
RCSID("$Id$"); RCSID("$Id$");
...@@ -11,7 +11,7 @@ RCSID("$Id$"); ...@@ -11,7 +11,7 @@ RCSID("$Id$");
#define SWAP(a,b) do { int _t = a; a = b; b = _t; } while(0) #define SWAP(a,b) do { int _t = a; a = b; b = _t; } while(0)
void rc4_set_key(struct rc4_ctx *ctx, const UINT8 *key, UINT32 len) void arcfour_set_key(struct arcfour_ctx *ctx, const UINT8 *key, UINT32 len)
{ {
register UINT8 j; /* Depends on the eight-bitness of these variables. */ register UINT8 j; /* Depends on the eight-bitness of these variables. */
unsigned i; unsigned i;
...@@ -32,7 +32,8 @@ void rc4_set_key(struct rc4_ctx *ctx, const UINT8 *key, UINT32 len) ...@@ -32,7 +32,8 @@ void rc4_set_key(struct rc4_ctx *ctx, const UINT8 *key, UINT32 len)
ctx->i = ctx->j = 0; ctx->i = ctx->j = 0;
} }
void rc4_crypt(struct rc4_ctx *ctx, UINT8 *dest, const UINT8 *src, UINT32 len) void arcfour_crypt(struct arcfour_ctx *ctx, UINT8 *dest,
const UINT8 *src, UINT32 len)
{ {
register UINT8 i, j; register UINT8 i, j;
......
/*
* $Id$
*/
#ifndef ARCFOUR_H_INCLUDED
#define ARCFOUR_H_INCLUDED
#include "crypto_types.h"
struct arcfour_ctx {
UINT8 S[256];
UINT8 i, j;
};
#if 0
void arcfour_init(struct arcfour_ctx *ctx);
#endif
void arcfour_set_key(struct arcfour_ctx *ctx, const UINT8 *key, UINT32 len);
void arcfour_crypt(struct arcfour_ctx *ctx, UINT8 *dest,
const UINT8 *src, UINT32 len);
#endif /* ARCFOUR_H_INCLUDED */
/*
* $Id$
*/
#ifndef RC4_H_INCLUDED
#define RC4_H_INCLUDED
#include "crypto_types.h"
struct rc4_ctx {
UINT8 S[256];
UINT8 i, j;
};
#if 0
void rc4_init(struct rc4_ctx *ctx);
#endif
void rc4_set_key(struct rc4_ctx *ctx, const UINT8 *key, UINT32 len);
void rc4_crypt(struct rc4_ctx *ctx, UINT8 *dest, const UINT8 *src, UINT32 len);
#endif /* RC4_H_INCLUDED */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment