diff options
Diffstat (limited to 'cipher/des.c')
-rw-r--r-- | cipher/des.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/cipher/des.c b/cipher/des.c index c2ca3f848..847a3473e 100644 --- a/cipher/des.c +++ b/cipher/des.c @@ -147,9 +147,6 @@ working_memcmp( const char *a, const char *b, size_t n ) #endif -/* Macros used by the info function. */ -#define FNCCAST_SETKEY(f) ((int(*)(void*, byte*, unsigned))(f)) -#define FNCCAST_CRYPT(f) ((void(*)(void*, byte*, byte*))(f)) /* @@ -996,14 +993,16 @@ des_get_info( int algo, size_t *keylen, } } - if( algo == CIPHER_ALGO_3DES ) { *keylen = 192; *blocksize = 8; *contextsize = sizeof(struct _tripledes_ctx); - *r_setkey = FNCCAST_SETKEY(do_tripledes_setkey); - *r_encrypt= FNCCAST_CRYPT(do_tripledes_encrypt); - *r_decrypt= FNCCAST_CRYPT(do_tripledes_decrypt); + *(int (**)(struct _tripledes_ctx*, byte*, unsigned))r_setkey + = do_tripledes_setkey; + *(void (**)(struct _tripledes_ctx*, byte*, byte*))r_encrypt + = do_tripledes_encrypt; + *(void (**)(struct _tripledes_ctx*, byte*, byte*))r_decrypt + = do_tripledes_decrypt; return "3DES"; } return NULL; |