diff options
author | Hans-Joerg Hoexer <hshoexer@cvs.openbsd.org> | 2005-03-24 11:43:41 +0000 |
---|---|---|
committer | Hans-Joerg Hoexer <hshoexer@cvs.openbsd.org> | 2005-03-24 11:43:41 +0000 |
commit | 70efe0d869583bb589a6fd9d4ec8d81f50e1f7f2 (patch) | |
tree | e47500d53b0639ce9f72e9dff6596ab02725cadb /sys/crypto/blf.c | |
parent | c5ee8db66e93d5b5f9c0437e21ffeb0bf17ad246 (diff) |
ansi and tiny knf
ok deraadt@
Diffstat (limited to 'sys/crypto/blf.c')
-rw-r--r-- | sys/crypto/blf.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/sys/crypto/blf.c b/sys/crypto/blf.c index 02793f30090..4046dd62450 100644 --- a/sys/crypto/blf.c +++ b/sys/crypto/blf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: blf.c,v 1.5 2003/04/09 21:23:51 markus Exp $ */ +/* $OpenBSD: blf.c,v 1.6 2005/03/24 11:43:40 hshoexer Exp $ */ /* * Blowfish block cipher for OpenBSD @@ -62,9 +62,7 @@ #define BLFRND(s,p,i,j,n) (i ^= F(s,j) ^ (p)[n]) void -Blowfish_encipher(c, x) - blf_ctx *c; - u_int32_t *x; +Blowfish_encipher(blf_ctx *c, u_int32_t *x) { u_int32_t Xl; u_int32_t Xr; @@ -89,9 +87,7 @@ Blowfish_encipher(c, x) } void -Blowfish_decipher(c, x) - blf_ctx *c; - u_int32_t *x; +Blowfish_decipher(blf_ctx *c, u_int32_t *x) { u_int32_t Xl; u_int32_t Xr; @@ -116,11 +112,9 @@ Blowfish_decipher(c, x) } void -Blowfish_initstate(c) - blf_ctx *c; +Blowfish_initstate(blf_ctx *c) { - -/* P-box and S-box tables initialized with digits of Pi */ + /* P-box and S-box tables initialized with digits of Pi */ static const blf_ctx initstate = @@ -395,11 +389,11 @@ Blowfish_initstate(c) } }; *c = initstate; - } u_int32_t -Blowfish_stream2word(const u_int8_t *data, u_int16_t databytes, u_int16_t *current) +Blowfish_stream2word(const u_int8_t *data, u_int16_t databytes, + u_int16_t *current) { u_int8_t i; u_int16_t j; @@ -457,7 +451,7 @@ Blowfish_expand0state(blf_ctx *c, const u_int8_t *key, u_int16_t keybytes) void Blowfish_expandstate(blf_ctx *c, const u_int8_t *data, u_int16_t databytes, - const u_int8_t *key, u_int16_t keybytes) + const u_int8_t *key, u_int16_t keybytes) { u_int16_t i; u_int16_t j; |