diff options
author | Jim Meyering <meyering@redhat.com> | 2008-07-31 15:35:25 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-07-31 15:50:53 +0200 |
commit | 3054279c0cca4c1f9c61997f924685b1d70c2353 (patch) | |
tree | ac838df2249feb7725a044d5ac8987fc74957ff7 /lib/sha256.h | |
parent | d5ea91965354489ef1eb271a05c4235f5b043590 (diff) | |
download | gnulib-3054279c0cca4c1f9c61997f924685b1d70c2353.tar.gz |
sha256.h: correct definition on SHA224_DIGEST_SIZE
* lib/sha256.h (SHA224_DIGEST_SIZE): Define to 28, not 24.
Reported by Paulie Pena IV <paulie4@gmail.com>.
Define as 224 / 8, rather than as a literal.
(SHA256_DIGEST_SIZE): Define as 256/8 rather than equivalent literal.
* lib/sha512.h (SHA384_DIGEST_SIZE): Likewise, define as equiv: 384/8.
(SHA512_DIGEST_SIZE): Likewise, define as equivalent quotient: 512/8.
Diffstat (limited to 'lib/sha256.h')
-rw-r--r-- | lib/sha256.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sha256.h b/lib/sha256.h index 3aa1ce97bd..a63b2015d8 100644 --- a/lib/sha256.h +++ b/lib/sha256.h @@ -31,8 +31,8 @@ struct sha256_ctx uint32_t buffer[32]; }; -enum { SHA224_DIGEST_SIZE = 24 }; -enum { SHA256_DIGEST_SIZE = 32 }; +enum { SHA224_DIGEST_SIZE = 224 / 8 }; +enum { SHA256_DIGEST_SIZE = 256 / 8 }; /* Initialize structure containing state of computation. */ extern void sha256_init_ctx (struct sha256_ctx *ctx); |