Skip to content
Snippets Groups Projects
Commit 1c49f9e4 authored by Niels Möller's avatar Niels Möller
Browse files

Changed order of arguments to idea_crypt()

Rev: src/modules/_Crypto/idea.c:1.7
Rev: src/modules/_Crypto/include/idea.h:1.2
Rev: src/modules/_Crypto/lib/idea.c:1.3
parent c3f90ba5
No related branches found
No related tags found
No related merge requests found
/* /*
* $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 * IDEA crypto module for Pike
* *
...@@ -20,22 +20,6 @@ ...@@ -20,22 +20,6 @@
#include "object.h" #include "object.h"
#include "error.h" #include "error.h"
#include "las.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 */ /* Backend includes */
#include <idea.h> #include <idea.h>
...@@ -144,8 +128,8 @@ static void f_crypt_block(INT32 args) ...@@ -144,8 +128,8 @@ static void f_crypt_block(INT32 args)
s = begin_shared_string(len); s = begin_shared_string(len);
for(i = 0; i < len; i += IDEA_BLOCKSIZE) for(i = 0; i < len; i += IDEA_BLOCKSIZE)
idea_crypt((unsigned INT8 *) s->str + i, idea_crypt(THIS,
THIS, (unsigned INT8 *) s->str + i,
(unsigned INT8 *) sp[-1].u.string->str + i); (unsigned INT8 *) sp[-1].u.string->str + i);
pop_n_elems(args); pop_n_elems(args);
......
...@@ -15,8 +15,8 @@ void idea_expand(unsigned INT16 *ctx, ...@@ -15,8 +15,8 @@ void idea_expand(unsigned INT16 *ctx,
void idea_invert(unsigned INT16 *d, void idea_invert(unsigned INT16 *d,
const unsigned INT16 *e); const unsigned INT16 *e);
void idea_crypt(unsigned INT8 *dest, void idea_crypt(const unsigned INT16 *ctx,
const unsigned INT16 *key, unsigned INT8 *dest,
const unsigned INT8 *src); const unsigned INT8 *src);
#endif /* IDEA_H_INCLUDED */ #endif /* IDEA_H_INCLUDED */
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
*/ */
#include "types.h" #include "types.h"
#include "idea.h" #include <idea.h>
#include <string.h> #include <string.h>
...@@ -211,8 +211,8 @@ idea_invert(unsigned INT16 *d, ...@@ -211,8 +211,8 @@ idea_invert(unsigned INT16 *d,
/* IDEA encryption/decryption algorithm */ /* IDEA encryption/decryption algorithm */
/* Note that in and out can be the same buffer */ /* Note that in and out can be the same buffer */
void void
idea_crypt(unsigned INT8 *dest, idea_crypt(const unsigned INT16 *key,
const unsigned INT16 *key, unsigned INT8 *dest,
const unsigned INT8 *src) const unsigned INT8 *src)
{ {
register unsigned INT16 x1, x2, x3, x4, s2, s3; register unsigned INT16 x1, x2, x3, x4, s2, s3;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment