summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-07-24 22:49:39 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-07-24 22:49:39 +0200
commita46272c01ef6fda081250b63ff0b6b76ec671cda (patch)
tree743f63392dde03bbb45eb4ecd6522cb36ef61785 /apt-pkg
parent4bbffb86b668e067bf930ae8a57aebc4afa33de5 (diff)
* apt-pkg/contrib/sha256.cc:
- fix the sha256 code (thanks to Jakob Bohm, closes: #378183)
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/contrib/sha256.cc8
1 files changed, 4 insertions, 4 deletions
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)