From: Junio C Hamano Date: Wed, 12 Sep 2012 18:42:36 GMT Subject: Re: [PATCH 3/3] sha1: use char type for temporary work buffer Message-ID: <7v8vcfccbn.fsf@alter.siamese.dyndns.org> In-Reply-To: Yann Droneaud writes: > The SHA context is holding a temporary buffer for partial block. > > This block must 64 bytes long. It is currently described as > an array of 16 integers. > > Signed-off-by: Yann Droneaud > --- As we do not work with 16-bit integers anyway, 16 integers occupy 64 bytes anyway. What problem does this series fix? > block-sha1/sha1.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/block-sha1/sha1.h b/block-sha1/sha1.h > index b864df6..d29ff6a 100644 > --- a/block-sha1/sha1.h > +++ b/block-sha1/sha1.h > @@ -9,7 +9,7 @@ > typedef struct { > unsigned long long size; > unsigned int H[5]; > - unsigned int W[16]; > + unsigned char W[64]; > } blk_SHA_CTX; > > void blk_SHA1_Init(blk_SHA_CTX *ctx);