From: Theodore Ts'o Date: Thu, 26 Mar 2015 04:17:48 +0000 (-0400) Subject: libext2fs: fix blocksize for SHA512 X-Git-Tag: v1.43-WIP-2015-05-18~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4241cf50a028d2da3c7f4c683bfe591fa5e8748;p=thirdparty%2Fe2fsprogs.git libext2fs: fix blocksize for SHA512 The blocksize of SHA512 is 128 bytes, not 512. Signed-off-by: Theodore Ts'o --- diff --git a/lib/ext2fs/sha512.c b/lib/ext2fs/sha512.c index 3539c281f..f1130538b 100644 --- a/lib/ext2fs/sha512.c +++ b/lib/ext2fs/sha512.c @@ -202,7 +202,7 @@ static void sha512_done(struct hash_state * md, unsigned char *out) } #define MIN(x, y) ( ((x)<(y))?(x):(y) ) -#define SHA512_BLOCKSIZE 512 +#define SHA512_BLOCKSIZE 128 static void sha512_process(struct hash_state * md, const unsigned char *in, unsigned long inlen)