diff options
author | Werner Koch <wk@gnupg.org> | 2013-10-02 13:39:47 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2013-10-02 13:39:47 +0200 |
commit | 0d39997932617ba20656f8bcc230ba744b76c87e (patch) | |
tree | b5c52e2190f11703285b41f48ecc21a91dd4c579 /cipher/sha512.c | |
parent | 3ca180b25e8df252fc16f802cfdc27496e307830 (diff) | |
download | libgcrypt-0d39997932617ba20656f8bcc230ba744b76c87e.tar.gz |
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 <wk@gnupg.org>
Diffstat (limited to 'cipher/sha512.c')
-rw-r--r-- | cipher/sha512.c | 8 |
1 files changed, 2 insertions, 6 deletions
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 }; |