aboutsummaryrefslogtreecommitdiffstats
path: root/cipher/blowfish.c
diff options
context:
space:
mode:
Diffstat (limited to 'cipher/blowfish.c')
-rw-r--r--cipher/blowfish.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/cipher/blowfish.c b/cipher/blowfish.c
index 5a829d413..0cb5a861f 100644
--- a/cipher/blowfish.c
+++ b/cipher/blowfish.c
@@ -43,9 +43,6 @@
#define CIPHER_ALGO_BLOWFISH 4 /* blowfish 128 bit key */
-#define FNCCAST_SETKEY(f) (int(*)(void*, byte*, unsigned))(f)
-#define FNCCAST_CRYPT(f) (void(*)(void*, byte*, byte*))(f)
-
#define BLOWFISH_BLOCKSIZE 8
#define BLOWFISH_ROUNDS 16
@@ -584,9 +581,12 @@ blowfish_get_info( int algo, size_t *keylen,
*keylen = 128;
*blocksize = BLOWFISH_BLOCKSIZE;
*contextsize = sizeof(BLOWFISH_context);
- *r_setkey = FNCCAST_SETKEY(bf_setkey);
- *r_encrypt= FNCCAST_CRYPT(encrypt_block);
- *r_decrypt= FNCCAST_CRYPT(decrypt_block);
+ *(int (**)(BLOWFISH_context*, byte*, unsigned))r_setkey
+ = bf_setkey;
+ *(void (**)(BLOWFISH_context*, byte*, byte*))r_encrypt
+ = encrypt_block;
+ *(void (**)(BLOWFISH_context*, byte*, byte*))r_decrypt
+ = decrypt_block;
if( algo == CIPHER_ALGO_BLOWFISH )
return "BLOWFISH";