From c8f4cc3588e534cf5dfe8163113e16c64fe33b29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= Date: Wed, 7 Jul 2010 21:32:03 +0200 Subject: * aes.h (aes_encrypt, aes_decrypt): Declare ctx argument as const. Also updated implementation. * blowfish.h (blowfish_encrypt, blowfish_decrypt): Likewise. * cast128.h (cast128_encrypt, cast128_decrypt): Likewise. * serpent.h (serpent_encrypt, serpent_decrypt): Likewise. * twofish.h (twofish_encrypt, twofish_decrypt): Likewise. Rev: nettle/ChangeLog:1.91 Rev: nettle/aes-decrypt.c:1.2 Rev: nettle/aes-encrypt.c:1.2 Rev: nettle/aes.h:1.2 Rev: nettle/blowfish.c:1.3 Rev: nettle/blowfish.h:1.3 Rev: nettle/cast128.c:1.2 Rev: nettle/cast128.h:1.2 Rev: nettle/serpent.c:1.2 Rev: nettle/serpent.h:1.2 Rev: nettle/twofish.c:1.2 Rev: nettle/twofish.h:1.2 --- blowfish.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'blowfish.c') diff --git a/blowfish.c b/blowfish.c index b8f7ca58..25c99c29 100644 --- a/blowfish.c +++ b/blowfish.c @@ -245,7 +245,7 @@ initial_ctx = #define R(c, l, r, i) do { l ^= c->p[i]; r ^= F(c, l); } while(0) static void -encrypt(struct blowfish_ctx *bc, uint32_t *ret_xl, uint32_t *ret_xr) +encrypt(const struct blowfish_ctx *bc, uint32_t *ret_xl, uint32_t *ret_xr) { uint32_t xl, xr; @@ -276,7 +276,7 @@ encrypt(struct blowfish_ctx *bc, uint32_t *ret_xl, uint32_t *ret_xr) } static void -decrypt(struct blowfish_ctx *bc, uint32_t *ret_xl, uint32_t *ret_xr ) +decrypt(const struct blowfish_ctx *bc, uint32_t *ret_xl, uint32_t *ret_xr ) { uint32_t xl, xr; @@ -311,7 +311,7 @@ decrypt(struct blowfish_ctx *bc, uint32_t *ret_xl, uint32_t *ret_xr ) #undef R void -blowfish_encrypt(struct blowfish_ctx *bc, unsigned length, +blowfish_encrypt(const struct blowfish_ctx *bc, unsigned length, uint8_t *outbuf, const uint8_t *inbuf) { uint32_t d1, d2; @@ -330,7 +330,7 @@ blowfish_encrypt(struct blowfish_ctx *bc, unsigned length, void -blowfish_decrypt(struct blowfish_ctx *bc, unsigned length, +blowfish_decrypt(const struct blowfish_ctx *bc, unsigned length, uint8_t *outbuf, const uint8_t *inbuf ) { uint32_t d1, d2; -- cgit v1.2.1