OSDN Git Service

libext2fs: fix blocksize for SHA512
authorTheodore Ts'o <tytso@mit.edu>
Thu, 26 Mar 2015 04:17:48 +0000 (00:17 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 26 Mar 2015 04:17:48 +0000 (00:17 -0400)
The blocksize of SHA512 is 128 bytes, not 512.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/sha512.c

index 3539c28..f113053 100644 (file)
@@ -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)