From 9f77bb3afc3b3684be0c90db144c2af56a2f56e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se> Date: Mon, 21 Dec 1998 02:44:11 +0100 Subject: [PATCH] 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) --- Makefile.am.in | 2 +- rc4.c => arcfour.c | 9 +++++---- include/arcfour.h | 23 +++++++++++++++++++++++ include/rc4.h | 22 ---------------------- 4 files changed, 29 insertions(+), 27 deletions(-) rename rc4.c => arcfour.c (79%) create mode 100644 include/arcfour.h delete mode 100644 include/rc4.h diff --git a/Makefile.am.in b/Makefile.am.in index 1351751d..1b0601cf 100644 --- a/Makefile.am.in +++ b/Makefile.am.in @@ -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 \ $(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. $(des_headers): desdata diff --git a/rc4.c b/arcfour.c similarity index 79% rename from rc4.c rename to arcfour.c index 034c0ca5..4aeedc9d 100644 --- a/rc4.c +++ b/arcfour.c @@ -1,9 +1,9 @@ -/* rc4.c +/* arcfour.c * */ #include "crypto_types.h" -#include <rc4.h> +#include <arcfour.h> #ifdef RCSID RCSID("$Id$"); @@ -11,7 +11,7 @@ RCSID("$Id$"); #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. */ unsigned i; @@ -32,7 +32,8 @@ void rc4_set_key(struct rc4_ctx *ctx, const UINT8 *key, UINT32 len) 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; diff --git a/include/arcfour.h b/include/arcfour.h new file mode 100644 index 00000000..8287cc3a --- /dev/null +++ b/include/arcfour.h @@ -0,0 +1,23 @@ +/* + * $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 */ diff --git a/include/rc4.h b/include/rc4.h deleted file mode 100644 index 3e9827d5..00000000 --- a/include/rc4.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * $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 */ -- GitLab