diff --git a/src/modules/_Crypto/idea.c b/src/modules/_Crypto/idea.c index ff535ce9a4f410b7d7443755633b0d2dc9f24bb9..c923594792c9d7e471e6b26d7ad71039a1508a53 100644 --- a/src/modules/_Crypto/idea.c +++ b/src/modules/_Crypto/idea.c @@ -1,5 +1,5 @@ /* - * $Id: idea.c,v 1.6 1997/01/14 18:28:29 nisse Exp $ + * $Id: idea.c,v 1.7 1997/02/11 17:36:51 nisse Exp $ * * IDEA crypto module for Pike * @@ -20,22 +20,6 @@ #include "object.h" #include "error.h" #include "las.h" -#if 0 -#include "constants.h" -#include "macros.h" -#include "threads.h" -#include "stralloc.h" -#include "builtin_functions.h" - -/* System includes */ -#include <sys/types.h> -#include <sys/stat.h> -#include <sys/mman.h> -#include <sys/stat.h> -#include <unistd.h> -#include <fcntl.h> -#include <errno.h> -#endif /* Backend includes */ #include <idea.h> @@ -144,8 +128,8 @@ static void f_crypt_block(INT32 args) s = begin_shared_string(len); for(i = 0; i < len; i += IDEA_BLOCKSIZE) - idea_crypt((unsigned INT8 *) s->str + i, - THIS, + idea_crypt(THIS, + (unsigned INT8 *) s->str + i, (unsigned INT8 *) sp[-1].u.string->str + i); pop_n_elems(args); diff --git a/src/modules/_Crypto/include/idea.h b/src/modules/_Crypto/include/idea.h index 87e6b12524d57926e469b8a061561237bf6bb967..d06e83acec28c3a11a2c81f517b640c3854ef5a7 100644 --- a/src/modules/_Crypto/include/idea.h +++ b/src/modules/_Crypto/include/idea.h @@ -13,10 +13,10 @@ void idea_expand(unsigned INT16 *ctx, const unsigned INT8 *key); void idea_invert(unsigned INT16 *d, - const unsigned INT16 *e); + const unsigned INT16 *e); -void idea_crypt(unsigned INT8 *dest, - const unsigned INT16 *key, +void idea_crypt(const unsigned INT16 *ctx, + unsigned INT8 *dest, const unsigned INT8 *src); #endif /* IDEA_H_INCLUDED */ diff --git a/src/modules/_Crypto/lib/idea.c b/src/modules/_Crypto/lib/idea.c index acfc900ef9abe523765cc377ed330e35e9f4d6e3..029e1d88b56eca1f770e5354fbdbe4e39fd3956f 100644 --- a/src/modules/_Crypto/lib/idea.c +++ b/src/modules/_Crypto/lib/idea.c @@ -25,7 +25,7 @@ */ #include "types.h" -#include "idea.h" +#include <idea.h> #include <string.h> @@ -211,8 +211,8 @@ idea_invert(unsigned INT16 *d, /* IDEA encryption/decryption algorithm */ /* Note that in and out can be the same buffer */ void -idea_crypt(unsigned INT8 *dest, - const unsigned INT16 *key, +idea_crypt(const unsigned INT16 *key, + unsigned INT8 *dest, const unsigned INT8 *src) { register unsigned INT16 x1, x2, x3, x4, s2, s3;