From c4241cf50a028d2da3c7f4c683bfe591fa5e8748 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Thu, 26 Mar 2015 00:17:48 -0400 Subject: [PATCH] libext2fs: fix blocksize for SHA512 The blocksize of SHA512 is 128 bytes, not 512. Signed-off-by: Theodore Ts'o --- lib/ext2fs/sha512.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ext2fs/sha512.c b/lib/ext2fs/sha512.c index 3539c28..f113053 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) -- 1.8.3.1