diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-07-24 22:49:39 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-07-24 22:49:39 +0200 |
commit | a46272c01ef6fda081250b63ff0b6b76ec671cda (patch) | |
tree | 743f63392dde03bbb45eb4ecd6522cb36ef61785 /apt-pkg/contrib | |
parent | 4bbffb86b668e067bf930ae8a57aebc4afa33de5 (diff) | |
download | apt-a46272c01ef6fda081250b63ff0b6b76ec671cda.tar.gz |
* apt-pkg/contrib/sha256.cc:
- fix the sha256 code (thanks to Jakob Bohm, closes: #378183)
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r-- | apt-pkg/contrib/sha256.cc | 8 |
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) |