From 0d39997932617ba20656f8bcc230ba744b76c87e Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 2 Oct 2013 13:39:47 +0200 Subject: md: Simplify the message digest dispatcher md.c. * src/gcrypt-module.h (gcry_md_spec_t): Move to ... * src/cipher-proto.h: here. Merge with md_extra_spec_t. Add fields ALGO and FLAGS. Set these fields in all digest modules. * cipher/md.c: Change most code to replace the former module system by a simpler system to gain information about the algorithms. Signed-off-by: Werner Koch --- cipher/sha512.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'cipher/sha512.c') diff --git a/cipher/sha512.c b/cipher/sha512.c index 505a1e46..af307751 100644 --- a/cipher/sha512.c +++ b/cipher/sha512.c @@ -731,12 +731,10 @@ static gcry_md_oid_spec_t oid_spec_sha512[] = gcry_md_spec_t _gcry_digest_spec_sha512 = { + GCRY_MD_SHA512, {0, 1}, "SHA512", sha512_asn, DIM (sha512_asn), oid_spec_sha512, 64, sha512_init, _gcry_md_block_write, sha512_final, sha512_read, sizeof (SHA512_CONTEXT), - }; -md_extra_spec_t _gcry_digest_extraspec_sha512 = - { run_selftests }; @@ -759,11 +757,9 @@ static gcry_md_oid_spec_t oid_spec_sha384[] = gcry_md_spec_t _gcry_digest_spec_sha384 = { + GCRY_MD_SHA384, {0, 1}, "SHA384", sha384_asn, DIM (sha384_asn), oid_spec_sha384, 48, sha384_init, _gcry_md_block_write, sha512_final, sha512_read, sizeof (SHA512_CONTEXT), - }; -md_extra_spec_t _gcry_digest_extraspec_sha384 = - { run_selftests }; -- cgit v1.2.1