summaryrefslogtreecommitdiff
path: root/lib/md5.c
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2013-05-08 20:21:18 +0200
committerLinus Nordberg <linus@nordberg.se>2013-05-08 20:21:18 +0200
commit68c9e3104d83febbcdb97cead0b8b6bfb6576d89 (patch)
tree995f87a30a7109f1ab9ebe2fb290545c6e5e1c89 /lib/md5.c
parent82c9dd49e981943c3c9af192b3023b141efc6f6b (diff)
Constify the MD5 implementation.
Diffstat (limited to 'lib/md5.c')
-rw-r--r--lib/md5.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/md5.c b/lib/md5.c
index 7d43a60..f4ac436 100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -89,9 +89,9 @@
* This processes one or more 64-byte data blocks, but does NOT update
* the bit counters. There are no alignment requirements.
*/
-static void *body(MD5_CTX *ctx, void *data, unsigned long size)
+static const void *body(MD5_CTX *ctx, const void *data, unsigned long size)
{
- unsigned char *ptr;
+ const unsigned char *ptr;
MD5_u32plus a, b, c, d;
MD5_u32plus saved_a, saved_b, saved_c, saved_d;
@@ -207,7 +207,7 @@ void MD5_Init(MD5_CTX *ctx)
ctx->hi = 0;
}
-void MD5_Update(MD5_CTX *ctx, void *data, unsigned long size)
+void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size)
{
MD5_u32plus saved_lo;
unsigned long used, free;