]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/sha1.h
* Swedish translation update. Closes: #592366
[apt.git] / apt-pkg / contrib / sha1.h
index a6fe2d94a219caf7d916ac2ffe82d0d1a77cd62b..8ddd889f18a22a70b2ac9015e4772fbc195ce3a1 100644 (file)
@@ -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.
 #ifndef APTPKG_SHA1_H
 #define APTPKG_SHA1_H
 
-#ifdef __GNUG__
-#pragma interface "apt-pkg/sha1.h"
-#endif 
-
 #include <string>
+#include <cstring>
+#include <algorithm>
+
+using std::string;
+using std::min;
 
 class SHA1Summation;
 
@@ -45,9 +46,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: