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/crc.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/crc.c')
-rw-r--r-- | cipher/crc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cipher/crc.c b/cipher/crc.c index 9e406f1b..4f72ffb2 100644 --- a/cipher/crc.c +++ b/cipher/crc.c @@ -272,8 +272,12 @@ crc24rfc2440_final (void *context) ctx->buf[2] = (ctx->CRC ) & 0xFF; } +/* We allow the CRC algorithms even in FIPS mode because they are + actually no cryptographic primitives. */ + gcry_md_spec_t _gcry_digest_spec_crc32 = { + GCRY_MD_CRC32, {0, 1}, "CRC32", NULL, 0, NULL, 4, crc32_init, crc32_write, crc32_final, crc32_read, sizeof (CRC_CONTEXT) @@ -281,6 +285,7 @@ gcry_md_spec_t _gcry_digest_spec_crc32 = gcry_md_spec_t _gcry_digest_spec_crc32_rfc1510 = { + GCRY_MD_CRC32_RFC1510, {0, 1}, "CRC32RFC1510", NULL, 0, NULL, 4, crc32rfc1510_init, crc32_write, crc32rfc1510_final, crc32_read, @@ -289,6 +294,7 @@ gcry_md_spec_t _gcry_digest_spec_crc32_rfc1510 = gcry_md_spec_t _gcry_digest_spec_crc24_rfc2440 = { + GCRY_MD_CRC24_RFC2440, {0, 1}, "CRC24RFC2440", NULL, 0, NULL, 3, crc24rfc2440_init, crc24rfc2440_write, crc24rfc2440_final, crc32_read, |