summaryrefslogtreecommitdiff
path: root/sys/crypto
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2002-03-15 18:19:54 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2002-03-15 18:19:54 +0000
commitde0519636e72969a9359cf27a32e00375235e343 (patch)
tree3670fa3ad7bf3bf88d6e1ab3add73f82987d555e /sys/crypto
parente018051dbb8764df0d8660f8e0e82fa3eaefb0c4 (diff)
Kill #if __STDC__ used to do K&R vs. ANSI varargs/stdarg; just do things
the ANSI way.
Diffstat (limited to 'sys/crypto')
-rw-r--r--sys/crypto/blf.c86
1 files changed, 1 insertions, 85 deletions
diff --git a/sys/crypto/blf.c b/sys/crypto/blf.c
index e321a46c4c1..e28015e6643 100644
--- a/sys/crypto/blf.c
+++ b/sys/crypto/blf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: blf.c,v 1.3 2000/06/17 23:36:22 provos Exp $ */
+/* $OpenBSD: blf.c,v 1.4 2002/03/15 18:19:52 millert Exp $ */
/*
* Blowfish block cipher for OpenBSD
@@ -398,16 +398,8 @@ Blowfish_initstate(c)
}
-#ifdef __STDC__
u_int32_t
Blowfish_stream2word(const u_int8_t *data, u_int16_t databytes, u_int16_t *current)
-#else
-u_int32_t
-Blowfish_stream2word(data, databytes, current)
- const u_int8_t *data;
- u_int16_t databytes;
- u_int16_t *current;
-#endif
{
u_int8_t i;
u_int16_t j;
@@ -426,16 +418,8 @@ Blowfish_stream2word(data, databytes, current)
return temp;
}
-#if __STDC__
void
Blowfish_expand0state(blf_ctx *c, const u_int8_t *key, u_int16_t keybytes)
-#else
-void
-Blowfish_expand0state(c, key, keybytes)
- blf_ctx *c;
- const u_int8_t *key;
- u_int16_t keybytes;
-#endif
{
u_int16_t i;
u_int16_t j;
@@ -471,19 +455,9 @@ Blowfish_expand0state(c, key, keybytes)
}
-#if __STDC__
void
Blowfish_expandstate(blf_ctx *c, const u_int8_t *data, u_int16_t databytes,
const u_int8_t *key, u_int16_t keybytes)
-#else
-void
-Blowfish_expandstate(c, data, databytes, key, keybytes)
- blf_ctx *c;
- const u_int8_t *data;
- u_int16_t databytes;
- const u_int8_t *key;
- u_int16_t keybytes;
-#endif
{
u_int16_t i;
u_int16_t j;
@@ -523,16 +497,8 @@ Blowfish_expandstate(c, data, databytes, key, keybytes)
}
-#if __STDC__
void
blf_key(blf_ctx *c, const u_int8_t *k, u_int16_t len)
-#else
-void
-blf_key(c, k, len)
- blf_ctx *c;
- const u_int8_t *k;
- u_int16_t len;
-#endif
{
/* Initalize S-boxes and subkeys with Pi */
Blowfish_initstate(c);
@@ -541,16 +507,8 @@ blf_key(c, k, len)
Blowfish_expand0state(c, k, len);
}
-#if __STDC__
void
blf_enc(blf_ctx *c, u_int32_t *data, u_int16_t blocks)
-#else
-void
-blf_enc(c, data, blocks)
- blf_ctx *c;
- u_int32_t *data;
- u_int16_t blocks;
-#endif
{
u_int32_t *d;
u_int16_t i;
@@ -562,16 +520,8 @@ blf_enc(c, data, blocks)
}
}
-#if __STDC__
void
blf_dec(blf_ctx *c, u_int32_t *data, u_int16_t blocks)
-#else
-void
-blf_dec(c, data, blocks)
- blf_ctx *c;
- u_int32_t *data;
- u_int16_t blocks;
-#endif
{
u_int32_t *d;
u_int16_t i;
@@ -583,16 +533,8 @@ blf_dec(c, data, blocks)
}
}
-#if __STDC__
void
blf_ecb_encrypt(blf_ctx *c, u_int8_t *data, u_int32_t len)
-#else
-void
-blf_ecb_encrypt(c, data, len)
- blf_ctx *c;
- u_int8_t *data;
- u_int32_t len;
-#endif
{
u_int32_t l, r, d[2];
u_int32_t i;
@@ -617,16 +559,8 @@ blf_ecb_encrypt(c, data, len)
}
}
-#if __STDC__
void
blf_ecb_decrypt(blf_ctx *c, u_int8_t *data, u_int32_t len)
-#else
-void
-blf_ecb_decrypt(c, data, len)
- blf_ctx *c;
- u_int8_t *data;
- u_int32_t len;
-#endif
{
u_int32_t l, r, d[2];
u_int32_t i;
@@ -651,17 +585,8 @@ blf_ecb_decrypt(c, data, len)
}
}
-#if __STDC__
void
blf_cbc_encrypt(blf_ctx *c, u_int8_t *iv, u_int8_t *data, u_int32_t len)
-#else
-void
-blf_cbc_encrypt(c, iv, data, len)
- blf_ctx *c;
- u_int8_t *iv;
- u_int8_t *data;
- u_int32_t len;
-#endif
{
u_int32_t l, r, d[2];
u_int32_t i, j;
@@ -689,17 +614,8 @@ blf_cbc_encrypt(c, iv, data, len)
}
}
-#if __STDC__
void
blf_cbc_decrypt(blf_ctx *c, u_int8_t *iva, u_int8_t *data, u_int32_t len)
-#else
-void
-blf_cbc_decrypt(c, iva, data, len)
- blf_ctx *c;
- u_int8_t *iva;
- u_int8_t *data;
- u_int32_t len;
-#endif
{
u_int32_t l, r, d[2];
u_int8_t *iv;