diff options
author | Simon Josefsson <simon@josefsson.org> | 2008-03-28 15:50:04 +0100 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2008-03-28 15:50:04 +0100 |
commit | 47ce26fc9f5632c8b9b58999fe0484100a51289d (patch) | |
tree | e3b72ccce2200a88905d109f51f7e824972067a1 /lib/gc-libgcrypt.c | |
parent | 3f142642460fb3b111c1f3d059f026bf2d498ef9 (diff) | |
download | gnulib-47ce26fc9f5632c8b9b58999fe0484100a51289d.tar.gz |
Support SHA-224 in gc.
Diffstat (limited to 'lib/gc-libgcrypt.c')
-rw-r--r-- | lib/gc-libgcrypt.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/gc-libgcrypt.c b/lib/gc-libgcrypt.c index bec7b76f5a..2affba09a3 100644 --- a/lib/gc-libgcrypt.c +++ b/lib/gc-libgcrypt.c @@ -294,6 +294,10 @@ gc_hash_open (Gc_hash hash, Gc_hash_mode mode, gc_hash_handle * outhandle) gcryalg = GCRY_MD_SHA512; break; + case GC_SHA224: + gcryalg = GCRY_MD_SHA224; + break; + case GC_RMD160: gcryalg = GCRY_MD_RMD160; break; @@ -393,6 +397,10 @@ gc_hash_digest_length (Gc_hash hash) len = GC_SHA512_DIGEST_SIZE; break; + case GC_SHA224: + len = GC_SHA224_DIGEST_SIZE; + break; + default: return 0; } @@ -508,6 +516,12 @@ gc_hash_buffer (Gc_hash hash, const void *in, size_t inlen, char *resbuf) break; #endif +#ifdef GNULIB_GC_SHA224 + case GC_SHA224: + gcryalg = GCRY_MD_SHA224; + break; +#endif + #ifdef GNULIB_GC_RMD160 case GC_RMD160: gcryalg = GCRY_MD_RMD160; |