[PATCH 3/3] sha1: use char type for temporary work buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <ydroneaud@xxxxxxxxxx>
---
 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);
-- 
1.7.11.4

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]