Message digest stuff.
[openssl.git] / crypto / sha / sha1dgst.c
index c7d52ee7343a62d1c422a9c1e09277dc8603ecd2..f4a47f3768b860d54c78b260a357148a63ee5024 100644 (file)
 #include <string.h>
 #undef  SHA_0
 #define SHA_1
-#include "sha.h"
+#include <openssl/sha.h>
 #include "sha_locl.h"
-#include "opensslv.h"
+#include <openssl/opensslv.h>
 
+#ifndef NO_SHA1
 char *SHA1_version="SHA1" OPENSSL_VERSION_PTEXT;
 
 /* Implemented from SHA-1 document - The Secure Hash Algorithm
@@ -80,22 +81,12 @@ char *SHA1_version="SHA1" OPENSSL_VERSION_PTEXT;
 #define K_40_59 0x8f1bbcdcUL
 #define K_60_79 0xca62c1d6UL
 
-#ifndef NOPROTO
 #  ifdef SHA1_ASM
      void sha1_block_x86(SHA_CTX *c, register SHA_LONG *p, int num);
 #    define sha1_block sha1_block_x86
 #  else
      void sha1_block(SHA_CTX *c, register SHA_LONG *p, int num);
 #  endif
-#else
-#  ifdef SHA1_ASM
-     void sha1_block_x86();
-#    define sha1_block sha1_block_x86
-#  else
-     void sha1_block();
-#  endif
-#endif
-
 
 #if defined(L_ENDIAN) && defined(SHA1_ASM)
 #  define      M_c2nl          c2l
@@ -123,7 +114,7 @@ void SHA1_Init(SHA_CTX *c)
        c->num=0;
        }
 
-void SHA1_Update(SHA_CTX *c, register unsigned char *data,
+void SHA1_Update(SHA_CTX *c, const register unsigned char *data,
             unsigned long len)
        {
        register SHA_LONG *p;
@@ -456,4 +447,5 @@ void SHA1_Final(unsigned char *md, SHA_CTX *c)
        c->num=0;
 /*     memset((char *)&c,0,sizeof(c));*/
        }
+#endif