summaryrefslogtreecommitdiff
path: root/crypto/bf
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/bf')
-rw-r--r--crypto/bf/bf_cbc.c9
-rw-r--r--crypto/bf/bf_cfb64.c10
-rw-r--r--crypto/bf/bf_ecb.c9
-rw-r--r--crypto/bf/bf_enc.c19
-rw-r--r--crypto/bf/bf_ofb64.c9
-rw-r--r--crypto/bf/bf_opts.c10
-rw-r--r--crypto/bf/bf_skey.c5
-rw-r--r--crypto/bf/bfspeed.c10
-rw-r--r--crypto/bf/bftest.c8
9 files changed, 24 insertions, 65 deletions
diff --git a/crypto/bf/bf_cbc.c b/crypto/bf/bf_cbc.c
index e0fa9ad763..90f1ffef2b 100644
--- a/crypto/bf/bf_cbc.c
+++ b/crypto/bf/bf_cbc.c
@@ -59,13 +59,8 @@
#include "blowfish.h"
#include "bf_locl.h"
-void BF_cbc_encrypt(in, out, length, ks, iv, encrypt)
-unsigned char *in;
-unsigned char *out;
-long length;
-BF_KEY *ks;
-unsigned char *iv;
-int encrypt;
+void BF_cbc_encrypt(unsigned char *in, unsigned char *out, long length,
+ BF_KEY *ks, unsigned char *iv, int encrypt)
{
register BF_LONG tin0,tin1;
register BF_LONG tout0,tout1,xor0,xor1;
diff --git a/crypto/bf/bf_cfb64.c b/crypto/bf/bf_cfb64.c
index f9c66e7ced..308b965867 100644
--- a/crypto/bf/bf_cfb64.c
+++ b/crypto/bf/bf_cfb64.c
@@ -64,14 +64,8 @@
* 64bit block we have used is contained in *num;
*/
-void BF_cfb64_encrypt(in, out, length, schedule, ivec, num, encrypt)
-unsigned char *in;
-unsigned char *out;
-long length;
-BF_KEY *schedule;
-unsigned char *ivec;
-int *num;
-int encrypt;
+void BF_cfb64_encrypt(unsigned char *in, unsigned char *out, long length,
+ BF_KEY *schedule, unsigned char *ivec, int *num, int encrypt)
{
register BF_LONG v0,v1,t;
register int n= *num;
diff --git a/crypto/bf/bf_ecb.c b/crypto/bf/bf_ecb.c
index efceae6e20..7abe20979d 100644
--- a/crypto/bf/bf_ecb.c
+++ b/crypto/bf/bf_ecb.c
@@ -67,7 +67,7 @@
const char *BF_version="BlowFish" OPENSSL_VERSION_PTEXT;
-const char *BF_options()
+const char *BF_options(void)
{
#ifdef BF_PTR
return("blowfish(ptr)");
@@ -78,11 +78,8 @@ const char *BF_options()
#endif
}
-void BF_ecb_encrypt(in, out, ks, encrypt)
-unsigned char *in;
-unsigned char *out;
-BF_KEY *ks;
-int encrypt;
+void BF_ecb_encrypt(unsigned char *in, unsigned char *out, BF_KEY *ks,
+ int encrypt)
{
BF_LONG l,d[2];
diff --git a/crypto/bf/bf_enc.c b/crypto/bf/bf_enc.c
index 66a8604c59..9ae52425ae 100644
--- a/crypto/bf/bf_enc.c
+++ b/crypto/bf/bf_enc.c
@@ -65,13 +65,11 @@
*/
#if (BF_ROUNDS != 16) && (BF_ROUNDS != 20)
-If you set BF_ROUNDS to some value other than 16 or 20, you will have
+#error If you set BF_ROUNDS to some value other than 16 or 20, you will have \
to modify the code.
#endif
-void BF_encrypt(data,key)
-BF_LONG *data;
-BF_KEY *key;
+void BF_encrypt(BF_LONG *data, BF_KEY *key)
{
register BF_LONG l,r,*p,*s;
@@ -111,9 +109,7 @@ BF_KEY *key;
#ifndef BF_DEFAULT_OPTIONS
-void BF_decrypt(data,key)
-BF_LONG *data;
-BF_KEY *key;
+void BF_decrypt(BF_LONG *data, BF_KEY *key)
{
register BF_LONG l,r,*p,*s;
@@ -151,13 +147,8 @@ BF_KEY *key;
data[0]=r&0xffffffffL;
}
-void BF_cbc_encrypt(in, out, length, ks, iv, encrypt)
-unsigned char *in;
-unsigned char *out;
-long length;
-BF_KEY *ks;
-unsigned char *iv;
-int encrypt;
+void BF_cbc_encrypt(unsigned char *in, unsigned char *out, long length,
+ BF_KEY *ks, unsigned char *iv, int encrypt)
{
register BF_LONG tin0,tin1;
register BF_LONG tout0,tout1,xor0,xor1;
diff --git a/crypto/bf/bf_ofb64.c b/crypto/bf/bf_ofb64.c
index 5d844ac760..381f6a2a9c 100644
--- a/crypto/bf/bf_ofb64.c
+++ b/crypto/bf/bf_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 BF_ofb64_encrypt(in, out, length, schedule, ivec, num)
-unsigned char *in;
-unsigned char *out;
-long length;
-BF_KEY *schedule;
-unsigned char *ivec;
-int *num;
+void BF_ofb64_encrypt(unsigned char *in, unsigned char *out, long length,
+ BF_KEY *schedule, unsigned char *ivec, int *num)
{
register BF_LONG v0,v1,t;
register int n= *num;
diff --git a/crypto/bf/bf_opts.c b/crypto/bf/bf_opts.c
index 735d16b764..e818b76e5d 100644
--- a/crypto/bf/bf_opts.c
+++ b/crypto/bf/bf_opts.c
@@ -162,8 +162,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;
@@ -176,8 +175,7 @@ int sig;
#define START 0
#define STOP 1
-double Time_F(s)
-int s;
+double Time_F(int s)
{
double ret;
#ifdef TIMES
@@ -238,9 +236,7 @@ int s;
fprintf(stderr,"%s bytes per sec = %12.2f (%5.1fuS)\n",name, \
tm[index]*8,1.0e6/tm[index]);
-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/bf/bf_skey.c b/crypto/bf/bf_skey.c
index 86574c0acc..f6c45535e1 100644
--- a/crypto/bf/bf_skey.c
+++ b/crypto/bf/bf_skey.c
@@ -62,10 +62,7 @@
#include "bf_locl.h"
#include "bf_pi.h"
-void BF_set_key(key,len,data)
-BF_KEY *key;
-int len;
-unsigned char *data;
+void BF_set_key(BF_KEY *key, int len, unsigned char *data)
{
int i;
BF_LONG *p,ri,in[2];
diff --git a/crypto/bf/bfspeed.c b/crypto/bf/bfspeed.c
index 30db62b234..983eba52f0 100644
--- a/crypto/bf/bfspeed.c
+++ b/crypto/bf/bfspeed.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/bf/bftest.c b/crypto/bf/bftest.c
index 9266cf813a..e66ca044e2 100644
--- a/crypto/bf/bftest.c
+++ b/crypto/bf/bftest.c
@@ -260,9 +260,7 @@ static int test();
static int print_test_data();
#endif
-int main(argc,argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
{
int ret;
@@ -275,7 +273,7 @@ char *argv[];
return(0);
}
-static int print_test_data()
+static int print_test_data(void)
{
unsigned int i,j;
@@ -342,7 +340,7 @@ static int print_test_data()
return(0);
}
-static int test()
+static int test(void)
{
unsigned char cbc_in[40],cbc_out[40],iv[8];
int i,n,err=0;