diff --git a/Makefile.am.in b/Makefile.am.in index 1351751d17048610df61e6dc0dfaf8a04fd3f537..1b0601cf0d19ee0c2176738be7f2406c53c11957 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 034c0ca5f68e233f8ae5d859d89017df5297216c..4aeedc9d907d7edcb4906c82c01096ecdccd40a1 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 0000000000000000000000000000000000000000..8287cc3a5bd4b0e39d6c15a36ac0abb5477d419c --- /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 3e9827d55ae458ba8984690f2ae4339dda7b6d59..0000000000000000000000000000000000000000 --- 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 */