X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/aa1510d78eadc0edb78620b02babc3f5d754d91d..d45c49fcef815431b5c1e84be89c5cc99eba52e9:/apt-pkg/contrib/sha256.cc?ds=sidebyside diff --git a/apt-pkg/contrib/sha256.cc b/apt-pkg/contrib/sha256.cc index a4d258d26..ecda3d8e8 100644 --- a/apt-pkg/contrib/sha256.cc +++ b/apt-pkg/contrib/sha256.cc @@ -18,6 +18,12 @@ * any later version. * */ + +#ifdef __GNUG__ +#pragma implementation "apt-pkg/sha256.h" +#endif + + #define SHA256_DIGEST_SIZE 32 #define SHA256_HMAC_BLOCK_SIZE 64 @@ -61,7 +67,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] = ntohl( ((u32*)(input))[I] ); + 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)