summaryrefslogtreecommitdiff
path: root/cipher/cast5.c
diff options
context:
space:
mode:
authorMoritz Schulte <mo@g10code.com>2003-07-14 22:36:44 +0000
committerMoritz Schulte <mo@g10code.com>2003-07-14 22:36:44 +0000
commita66dbf4c7a0f7c0f6b2fe0378c97605373428154 (patch)
treeb833792b11097a48fbabed172ce981c57460ce9c /cipher/cast5.c
parent88920837676bf80c371ff950670fb2fa7bf58b24 (diff)
downloadlibgcrypt-a66dbf4c7a0f7c0f6b2fe0378c97605373428154.tar.gz
2003-07-14 Moritz Schulte <moritz@g10code.com>
* cipher.c (gcry_cipher_lookup_func_name): Also check the cipher name aliases, not just the primary name. (gcry_cipher_map_name): Remove kludge for aliasing Rijndael to AES. * arcfour.c, blowfish.c, cast5.c, des.c, twofish.c: Adjust cipher specification structures. * rijndael.c (rijndael_names, rijndael192_names, rijndael256_names): New variables, use them in the cipher specifications. * rmd160test.c: Removed file. * ac.c, arcfour.c, blowfish.c, cast5.c, cipher.c, des.c, dsa.c, elgamal.c, md.c, pubkey.c, random.c, rijndael.c, rsa.c, twofish.c: Used gcry_err* wrappers for libgpg symbols. * primegen.c (gen_prime): Correct the order arguments to extra_check. 2003-07-12 Moritz Schulte <moritz@g10code.com> * ac.c: Replaced all public occurences of gpg_error_t with gcry_error_t. * cipher.c: Likewise. * md.c: Likewise. * pubkey.c: Likewise. * random.c: Likewise. * cipher.c: Added support for TWOFISH128.
Diffstat (limited to 'cipher/cast5.c')
-rw-r--r--cipher/cast5.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cipher/cast5.c b/cipher/cast5.c
index 8c036d84..12e0d2af 100644
--- a/cipher/cast5.c
+++ b/cipher/cast5.c
@@ -50,7 +50,7 @@ typedef struct {
byte Kr[16];
} CAST5_context;
-static gpg_err_code_t cast_setkey (void *c, const byte *key, unsigned keylen);
+static gcry_err_code_t cast_setkey (void *c, const byte *key, unsigned keylen);
static void encrypt_block (void *c, byte *outbuf, const byte *inbuf);
static void decrypt_block (void *c, byte *outbuf, const byte *inbuf);
@@ -561,7 +561,7 @@ key_schedule( u32 *x, u32 *z, u32 *k )
}
-static gpg_err_code_t
+static gcry_err_code_t
do_cast_setkey( CAST5_context *c, const byte *key, unsigned keylen )
{
static int initialized;
@@ -604,11 +604,11 @@ do_cast_setkey( CAST5_context *c, const byte *key, unsigned keylen )
return GPG_ERR_NO_ERROR;
}
-static gpg_err_code_t
+static gcry_err_code_t
cast_setkey (void *context, const byte *key, unsigned keylen )
{
CAST5_context *c = (CAST5_context *) context;
- gpg_err_code_t rc = do_cast_setkey (c, key, keylen);
+ gcry_err_code_t rc = do_cast_setkey (c, key, keylen);
_gcry_burn_stack (96+7*sizeof(void*));
return rc;
}
@@ -616,6 +616,6 @@ cast_setkey (void *context, const byte *key, unsigned keylen )
gcry_cipher_spec_t cipher_spec_cast5 =
{
- "CAST5", CAST5_BLOCKSIZE, 128, sizeof (CAST5_context),
+ "CAST5", NULL, CAST5_BLOCKSIZE, 128, sizeof (CAST5_context),
cast_setkey, encrypt_block, decrypt_block,
};