overhauled the trustdb stuff
[gnupg.git] / cipher / cast5.h
index 4afaf2a..ea6fa9e 100644 (file)
 
 #include "types.h"
 
-#define CAST5_BLOCKSIZE 8
-
-typedef struct {
-    u32  Km[16];
-    byte Kr[16];
-    byte iv[CAST5_BLOCKSIZE];
-    byte eniv[CAST5_BLOCKSIZE];
-    int  count;
-} CAST5_context;
-
-void cast5_setkey( CAST5_context *c, byte *key, unsigned keylen );
-void cast5_setiv( CAST5_context *c, byte *iv );
-void cast5_encode( CAST5_context *c, byte *outbuf, byte *inbuf,
-                                                   unsigned nblocks );
-void cast5_decode( CAST5_context *c, byte *outbuf, byte *inbuf,
-                                                   unsigned nblocks );
-void cast5_encode_cfb( CAST5_context *c, byte *outbuf,
-                                        byte *inbuf, unsigned nbytes);
-void cast5_decode_cfb( CAST5_context *c, byte *outbuf,
-                                        byte *inbuf, unsigned nbytes);
-void cast5_sync_cfb( CAST5_context *c );
-
+const char *
+cast5_get_info( int algo, size_t *keylen,
+                  size_t *blocksize, size_t *contextsize,
+                  int  (**setkey)( void *c, byte *key, unsigned keylen ),
+                  void (**encrypt)( void *c, byte *outbuf, byte *inbuf ),
+                  void (**decrypt)( void *c, byte *outbuf, byte *inbuf )
+                );
 
 #endif /*G10_CAST5_H*/