summaryrefslogtreecommitdiffstats
path: root/crypto/idea
diff options
context:
space:
mode:
authorUlf Möller <ulf@openssl.org>1999-04-19 21:31:43 +0000
committerUlf Möller <ulf@openssl.org>1999-04-19 21:31:43 +0000
commit6b691a5c85ddc4e407e32781841fee5c029506cd (patch)
tree436f1127406e1cacfe83dfcbfff824d89c47d834 /crypto/idea
parent3edd7ed15de229230f74c79c3d71e7c9c674cf4f (diff)
Change functions to ANSI C.
Diffstat (limited to 'crypto/idea')
-rw-r--r--crypto/idea/i_cbc.c13
-rw-r--r--crypto/idea/i_cfb64.c11
-rw-r--r--crypto/idea/i_ecb.c8
-rw-r--r--crypto/idea/i_ofb64.c9
-rw-r--r--crypto/idea/i_skey.c11
-rw-r--r--crypto/idea/idea_spd.c10
-rw-r--r--crypto/idea/ideatest.c10
7 files changed, 20 insertions, 52 deletions
diff --git a/crypto/idea/i_cbc.c b/crypto/idea/i_cbc.c
index 716ea3f474..13b255e948 100644
--- a/crypto/idea/i_cbc.c
+++ b/crypto/idea/i_cbc.c
@@ -59,13 +59,8 @@
#include "idea.h"
#include "idea_lcl.h"
-void idea_cbc_encrypt(in, out, length, ks, iv, encrypt)
-unsigned char *in;
-unsigned char *out;
-long length;
-IDEA_KEY_SCHEDULE *ks;
-unsigned char *iv;
-int encrypt;
+void idea_cbc_encrypt(unsigned char *in, unsigned char *out, long length,
+ IDEA_KEY_SCHEDULE *ks, unsigned char *iv, int encrypt)
{
register unsigned long tin0,tin1;
register unsigned long tout0,tout1,xor0,xor1;
@@ -138,9 +133,7 @@ int encrypt;
tin[0]=tin[1]=0;
}
-void idea_encrypt(d,key)
-unsigned long *d;
-IDEA_KEY_SCHEDULE *key;
+void idea_encrypt(unsigned long *d, IDEA_KEY_SCHEDULE *key)
{
register IDEA_INT *p;
register unsigned long x1,x2,x3,x4,t0,t1,ul;
diff --git a/crypto/idea/i_cfb64.c b/crypto/idea/i_cfb64.c
index 8dfa7ece48..8dda0fbe70 100644
--- a/crypto/idea/i_cfb64.c
+++ b/crypto/idea/i_cfb64.c
@@ -64,14 +64,9 @@
* 64bit block we have used is contained in *num;
*/
-void idea_cfb64_encrypt(in, out, length, schedule, ivec, num, encrypt)
-unsigned char *in;
-unsigned char *out;
-long length;
-IDEA_KEY_SCHEDULE *schedule;
-unsigned char *ivec;
-int *num;
-int encrypt;
+void idea_cfb64_encrypt(unsigned char *in, unsigned char *out, long length,
+ IDEA_KEY_SCHEDULE *schedule, unsigned char *ivec, int *num,
+ int encrypt)
{
register unsigned long v0,v1,t;
register int n= *num;
diff --git a/crypto/idea/i_ecb.c b/crypto/idea/i_ecb.c
index 17d014a3f3..9ebaf40913 100644
--- a/crypto/idea/i_ecb.c
+++ b/crypto/idea/i_ecb.c
@@ -62,7 +62,7 @@
const char *IDEA_version="IDEA" OPENSSL_VERSION_PTEXT;
-const char *idea_options()
+const char *idea_options(void)
{
if (sizeof(short) != sizeof(IDEA_INT))
return("idea(int)");
@@ -70,10 +70,8 @@ const char *idea_options()
return("idea(short)");
}
-void idea_ecb_encrypt(in, out, ks)
-unsigned char *in;
-unsigned char *out;
-IDEA_KEY_SCHEDULE *ks;
+void idea_ecb_encrypt(unsigned char *in, unsigned char *out,
+ IDEA_KEY_SCHEDULE *ks)
{
unsigned long l0,l1,d[2];
diff --git a/crypto/idea/i_ofb64.c b/crypto/idea/i_ofb64.c
index d687adb22d..cf60ff98e2 100644
--- a/crypto/idea/i_ofb64.c
+++ b/crypto/idea/i_ofb64.c
@@ -63,13 +63,8 @@
* used. The extra state information to record how much of the
* 64bit block we have used is contained in *num;
*/
-void idea_ofb64_encrypt(in, out, length, schedule, ivec, num)
-unsigned char *in;
-unsigned char *out;
-long length;
-IDEA_KEY_SCHEDULE *schedule;
-unsigned char *ivec;
-int *num;
+void idea_ofb64_encrypt(unsigned char *in, unsigned char *out, long length,
+ IDEA_KEY_SCHEDULE *schedule, unsigned char *ivec, int *num)
{
register unsigned long v0,v1,t;
register int n= *num;
diff --git a/crypto/idea/i_skey.c b/crypto/idea/i_skey.c
index 00fcc1e586..3733be0b60 100644
--- a/crypto/idea/i_skey.c
+++ b/crypto/idea/i_skey.c
@@ -65,9 +65,7 @@ static IDEA_INT inverse(unsigned int xin);
static IDEA_INT inverse();
#endif
-void idea_set_encrypt_key(key, ks)
-unsigned char *key;
-IDEA_KEY_SCHEDULE *ks;
+void idea_set_encrypt_key(unsigned char *key, IDEA_KEY_SCHEDULE *ks)
{
int i;
register IDEA_INT *kt,*kf,r0,r1,r2;
@@ -101,9 +99,7 @@ IDEA_KEY_SCHEDULE *ks;
}
}
-void idea_set_decrypt_key(ek, dk)
-IDEA_KEY_SCHEDULE *ek;
-IDEA_KEY_SCHEDULE *dk;
+void idea_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk)
{
int r;
register IDEA_INT *fp,*tp,t;
@@ -133,8 +129,7 @@ IDEA_KEY_SCHEDULE *dk;
}
/* taken directly from the 'paper' I'll have a look at it later */
-static IDEA_INT inverse(xin)
-unsigned int xin;
+static IDEA_INT inverse(unsigned int xin)
{
long n1,n2,q,r,b1,b2,t;
diff --git a/crypto/idea/idea_spd.c b/crypto/idea/idea_spd.c
index 98060d9b8c..704538d41f 100644
--- a/crypto/idea/idea_spd.c
+++ b/crypto/idea/idea_spd.c
@@ -135,8 +135,7 @@ SIGRETTYPE sig_done(int sig);
SIGRETTYPE sig_done();
#endif
-SIGRETTYPE sig_done(sig)
-int sig;
+SIGRETTYPE sig_done(int sig)
{
signal(SIGALRM,sig_done);
run=0;
@@ -149,8 +148,7 @@ int sig;
#define START 0
#define STOP 1
-double Time_F(s)
-int s;
+double Time_F(int s)
{
double ret;
#ifdef TIMES
@@ -186,9 +184,7 @@ int s;
#endif
}
-int main(argc,argv)
-int argc;
-char **argv;
+int main(int argc, char **argv)
{
long count;
static unsigned char buf[BUFSIZE];
diff --git a/crypto/idea/ideatest.c b/crypto/idea/ideatest.c
index 6eff9029cc..542ece4aa3 100644
--- a/crypto/idea/ideatest.c
+++ b/crypto/idea/ideatest.c
@@ -103,9 +103,7 @@ static int cfb64_test();
static char *pt();
#endif
-int main(argc,argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
{
int i,err=0;
IDEA_KEY_SCHEDULE key,dkey;
@@ -171,8 +169,7 @@ char *argv[];
return(err);
}
-static int cfb64_test(cfb_cipher)
-unsigned char *cfb_cipher;
+static int cfb64_test(unsigned char *cfb_cipher)
{
IDEA_KEY_SCHEDULE eks,dks;
int err=0,i,n;
@@ -210,8 +207,7 @@ unsigned char *cfb_cipher;
return(err);
}
-static char *pt(p)
-unsigned char *p;
+static char *pt(unsigned char *p)
{
static char bufs[10][20];
static int bnum=0;