aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-11-17 11:48:30 +0000
committerGuy Harris <guy@alum.mit.edu>2005-11-17 11:48:30 +0000
commit0af35b78ddeb4dbd20038620ad6ad7ef45446247 (patch)
treed4e710f1a5071f734cc1a5724eaa37cd159b1ea6 /epan
parent148d700e012956c6c5a4262e0912c391543dbf5f (diff)
Constify arguments.
svn path=/trunk/; revision=16533
Diffstat (limited to 'epan')
-rw-r--r--epan/sha1.c8
-rw-r--r--epan/sha1.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/epan/sha1.c b/epan/sha1.c
index 52e95c132e..f92a3cf432 100644
--- a/epan/sha1.c
+++ b/epan/sha1.c
@@ -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 );
}
}
diff --git a/epan/sha1.h b/epan/sha1.h
index 4b7e7d4c8b..2f981f7703 100644
--- a/epan/sha1.h
+++ b/epan/sha1.h
@@ -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 */