summaryrefslogtreecommitdiff
path: root/cipher/sha512.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2013-10-02 13:39:47 +0200
committerWerner Koch <wk@gnupg.org>2013-10-02 13:39:47 +0200
commit0d39997932617ba20656f8bcc230ba744b76c87e (patch)
treeb5c52e2190f11703285b41f48ecc21a91dd4c579 /cipher/sha512.c
parent3ca180b25e8df252fc16f802cfdc27496e307830 (diff)
downloadlibgcrypt-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.c8
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
};