Constify arguments.
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 17 Nov 2005 11:48:30 +0000 (11:48 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 17 Nov 2005 11:48:30 +0000 (11:48 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16533 f5534014-38df-0310-8fa8-9805f1628bb7

epan/sha1.c
epan/sha1.h

index 52e95c132e24a1d4305a32c40a9c01d0cac1bfb5..f92a3cf4322313827ae27da71b9d2ccc63fac833 100644 (file)
@@ -57,7 +57,7 @@ void sha1_starts( sha1_context *ctx )
     ctx->state[4] = 0xC3D2E1F0;
 }
 
-static void sha1_process( sha1_context *ctx, guint8 data[64] )
+static void sha1_process( sha1_context *ctx, const guint8 data[64] )
 {
     guint32 temp, W[16], A, B, C, D, E;
 
@@ -213,7 +213,7 @@ static void sha1_process( sha1_context *ctx, guint8 data[64] )
     ctx->state[4] += E;
 }
 
-void sha1_update( sha1_context *ctx, guint8 *input, guint32 length )
+void sha1_update( sha1_context *ctx, const guint8 *input, guint32 length )
 {
     guint32 left, fill;
 
@@ -231,7 +231,7 @@ void sha1_update( sha1_context *ctx, guint8 *input, guint32 length )
     if( left && length >= fill )
     {
         memcpy( (void *) (ctx->buffer + left),
-                (void *) input, fill );
+                (const void *) input, fill );
         sha1_process( ctx, ctx->buffer );
         length -= fill;
         input  += fill;
@@ -248,7 +248,7 @@ void sha1_update( sha1_context *ctx, guint8 *input, guint32 length )
     if( length )
     {
         memcpy( (void *) (ctx->buffer + left),
-                (void *) input, length );
+                (const void *) input, length );
     }
 }
 
index 4b7e7d4c8be7578a433f94da25754c386c278ab4..2f981f7703508e366ee96b9b07fb7fa9bc8312c8 100644 (file)
@@ -37,7 +37,7 @@ typedef struct
 sha1_context;
 
 void sha1_starts( sha1_context *ctx );
-void sha1_update( sha1_context *ctx, guint8 *input, guint32 length );
+void sha1_update( sha1_context *ctx, const guint8 *input, guint32 length );
 void sha1_finish( sha1_context *ctx, guint8 digest[20] );
 
 #endif /* sha1.h */