X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/784202a271ae7e303aacbe226bb87fed50a16f81..1979e742ad5e2a0b6e547fbe3f4c4066b5a9bd2e:/apt-pkg/contrib/sha1.h diff --git a/apt-pkg/contrib/sha1.h b/apt-pkg/contrib/sha1.h index a6fe2d94a..db8ca7893 100644 --- a/apt-pkg/contrib/sha1.h +++ b/apt-pkg/contrib/sha1.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: sha1.h,v 1.1 2001/03/06 05:03:49 jgg Exp $ +// $Id: sha1.h,v 1.3 2001/05/07 05:05:47 jgg Exp $ /* ###################################################################### SHA1SumValue - Storage for a SHA-1 hash. @@ -19,6 +19,10 @@ #endif #include +#include + +using std::string; +using std::min; class SHA1Summation; @@ -45,9 +49,10 @@ class SHA1SumValue class SHA1Summation { - unsigned char Buffer[64]; - unsigned char State[5*4]; - unsigned char Count[2*4]; + /* assumes 64-bit alignment just in case */ + unsigned char Buffer[64] __attribute__((aligned(8))); + unsigned char State[5*4] __attribute__((aligned(8))); + unsigned char Count[2*4] __attribute__((aligned(8))); bool Done; public: