diff options
author | Werner Koch <wk@gnupg.org> | 2013-10-01 22:00:50 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2013-10-01 22:00:50 +0200 |
commit | 3ca180b25e8df252fc16f802cfdc27496e307830 (patch) | |
tree | 1399c7891aa6f4bf4bf994adaa078dadd3510091 /cipher/camellia-glue.c | |
parent | 4153fa859816e799e506055321a22e6450aacdcc (diff) | |
download | libgcrypt-3ca180b25e8df252fc16f802cfdc27496e307830.tar.gz |
cipher: Simplify the cipher dispatcher cipher.c.
* src/gcrypt-module.h (gcry_cipher_spec_t): Move to ...
* src/cipher-proto.h (gcry_cipher_spec_t): here. Merge with
cipher_extra_spec_t. Add fields ALGO and FLAGS. Set these fields in
all cipher modules.
* cipher/cipher.c: Change most code to replace the former module
system by a simpler system to gain information about the algorithms.
(disable_pubkey_algo): Simplified. Not anymore thread-safe, though.
* cipher/md.c (_gcry_md_selftest): Use correct structure. Not a real
problem because both define the same function as their first field.
* cipher/pubkey.c (_gcry_pk_selftest): Take care of the disabled flag.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'cipher/camellia-glue.c')
-rw-r--r-- | cipher/camellia-glue.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cipher/camellia-glue.c b/cipher/camellia-glue.c index 2842c3ba..29cb7a55 100644 --- a/cipher/camellia-glue.c +++ b/cipher/camellia-glue.c @@ -691,18 +691,21 @@ static gcry_cipher_oid_spec_t camellia256_oids[] = gcry_cipher_spec_t _gcry_cipher_spec_camellia128 = { + GCRY_CIPHER_CAMELLIA128, {0, 0}, "CAMELLIA128",NULL,camellia128_oids,CAMELLIA_BLOCK_SIZE,128, sizeof(CAMELLIA_context),camellia_setkey,camellia_encrypt,camellia_decrypt }; gcry_cipher_spec_t _gcry_cipher_spec_camellia192 = { + GCRY_CIPHER_CAMELLIA192, {0, 0}, "CAMELLIA192",NULL,camellia192_oids,CAMELLIA_BLOCK_SIZE,192, sizeof(CAMELLIA_context),camellia_setkey,camellia_encrypt,camellia_decrypt }; gcry_cipher_spec_t _gcry_cipher_spec_camellia256 = { + GCRY_CIPHER_CAMELLIA256, {0, 0}, "CAMELLIA256",NULL,camellia256_oids,CAMELLIA_BLOCK_SIZE,256, sizeof(CAMELLIA_context),camellia_setkey,camellia_encrypt,camellia_decrypt }; |