* 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.
+2008-07-31 Jim Meyering <meyering@redhat.com>
+
+ sha256.h: correct definition of 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.
+
2008-07-31 Bruno Haible <bruno@clisp.org>
* lib/regex_internal.h (BITSET_WORD_BITS): Make first conditional work
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);
u64 buffer[32];
};
-enum { SHA384_DIGEST_SIZE = 48 };
-enum { SHA512_DIGEST_SIZE = 64 };
+enum { SHA384_DIGEST_SIZE = 384 / 8 };
+enum { SHA512_DIGEST_SIZE = 512 / 8 };
/* Initialize structure containing state of computation. */
extern void sha512_init_ctx (struct sha512_ctx *ctx);