Make MD5 work on Alpha, and fix a bug.
[openssl.git] / crypto / md32_common.h
index dc464ea..8c0a085 100644 (file)
 #  endif
 #endif
 
-#if !defined(HASH_BLOCK_DATA_ORDER_ALIGNED) && HASH_BLOCK_DATA_ORDER_ALIGNED!=1
+#if !defined(HASH_BLOCK_DATA_ORDER_ALIGNED) || HASH_BLOCK_DATA_ORDER_ALIGNED==1
 #ifndef HASH_BLOCK_DATA_ORDER
 #error "HASH_BLOCK_DATA_ORDER must be defined!"
 #endif
@@ -468,7 +468,7 @@ void HASH_UPDATE (HASH_CTX *c, const unsigned char *data, unsigned long len)
                 */
                if ((((unsigned long)data)%4) == 0)
                        {
-                       HASH_BLOCK_DATA_ORDER_ALIGNED (c,(HASH_LONG *)data,sw);
+                       HASH_BLOCK_DATA_ORDER_ALIGNED (c,data,sw);
                        sw*=HASH_CBLOCK;
                        data+=sw;
                        len-=sw;
@@ -510,11 +510,11 @@ void HASH_UPDATE (HASH_CTX *c, const unsigned char *data, unsigned long len)
        }
 
 
-void HASH_TRANSFORM (HASH_CTX *c, unsigned char *data)
+void HASH_TRANSFORM (HASH_CTX *c, const unsigned char *data)
        {
 #if defined(HASH_BLOCK_DATA_ORDER_ALIGNED) && HASH_BLOCK_DATA_ORDER_ALIGNED!=1
        if ((((unsigned long)data)%4) == 0)
-               HASH_BLOCK_DATA_ORDER_ALIGNED (c,(HASH_LONG *)data,1);
+               HASH_BLOCK_DATA_ORDER_ALIGNED (c,data,1);
        else
 #if !defined(HASH_BLOCK_DATA_ORDER)
                {