Promote the pdkim variant-implementation sha routines to toplevel
[exim.git] / src / src / auths / sha1.c
index e98cb6f5204d5bf5e47b5744544db838019df441..753bea3db53105975aaee8e7ea08e04c8876d9af 100644 (file)
@@ -1,10 +1,8 @@
-/* $Cambridge: exim/src/src/auths/sha1.c,v 1.3 2006/02/07 11:19:01 ph10 Exp $ */
-
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
-/* Copyright (c) University of Cambridge 1995 - 2006 */
+/* Copyright (c) University of Cambridge 1995 - 2016 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 #ifndef STAND_ALONE
@@ -64,15 +62,15 @@ Returns:     nothing
 void
 sha1_mid(sha1 *base, const uschar *text)
 {
-register int i;
-unsigned int A, B, C, D, E;
-unsigned int W[80];
+int i;
+uint A, B, C, D, E;
+uint W[80];
 
 base->length += 64;
 
 for (i = 0; i < 16; i++)
   {
-  W[i] = (text[0] << 24) | (text[1] << 16) | (text[2] << 8) | text[3];
+  W[i] = ((uint)text[0] << 24) | (text[1] << 16) | (text[2] << 8) | text[3];
   text += 4;
   }