From a46272c01ef6fda081250b63ff0b6b76ec671cda Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 24 Jul 2006 22:49:39 +0200 Subject: * apt-pkg/contrib/sha256.cc: - fix the sha256 code (thanks to Jakob Bohm, closes: #378183) --- apt-pkg/contrib/sha256.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'apt-pkg/contrib') diff --git a/apt-pkg/contrib/sha256.cc b/apt-pkg/contrib/sha256.cc index ad2ddb2d3..b75ce8a84 100644 --- a/apt-pkg/contrib/sha256.cc +++ b/apt-pkg/contrib/sha256.cc @@ -61,10 +61,10 @@ static inline u32 Maj(u32 x, u32 y, u32 z) static inline void LOAD_OP(int I, u32 *W, const u8 *input) { - W[I] = ( ((u32) input[I + 0] << 24) - | ((u32) input[I + 1] << 16) - | ((u32) input[I + 2] << 8) - | ((u32) input[I + 3])); + W[I] = ( ((u32) input[I * 4 + 0] << 24) + | ((u32) input[I * 4 + 1] << 16) + | ((u32) input[I * 4 + 2] << 8) + | ((u32) input[I * 4 + 3])); } static inline void BLEND_OP(int I, u32 *W) -- cgit v1.2.3-70-g09d2