diff options
author | Ulf Möller <ulf@openssl.org> | 2000-02-03 18:22:01 +0000 |
---|---|---|
committer | Ulf Möller <ulf@openssl.org> | 2000-02-03 18:22:01 +0000 |
commit | 9dbc41d7eed7d69da54dc81082794845c50ad482 (patch) | |
tree | 3c59e6df13deb5eed99501dc7fffac681fb7e1eb /crypto/mdc2 | |
parent | 82fc1d9c28e834549f61e4c91b3f6bbdf4c48153 (diff) |
Document hash functions.
Diffstat (limited to 'crypto/mdc2')
-rw-r--r-- | crypto/mdc2/mdc2.h | 5 | ||||
-rw-r--r-- | crypto/mdc2/mdc2_one.c | 2 | ||||
-rw-r--r-- | crypto/mdc2/mdc2dgst.c | 6 |
3 files changed, 7 insertions, 6 deletions
diff --git a/crypto/mdc2/mdc2.h b/crypto/mdc2/mdc2.h index ec8e159fc9..00acd707cd 100644 --- a/crypto/mdc2/mdc2.h +++ b/crypto/mdc2/mdc2.h @@ -82,9 +82,10 @@ typedef struct mdc2_ctx_st void MDC2_Init(MDC2_CTX *c); -void MDC2_Update(MDC2_CTX *c, unsigned char *data, unsigned long len); +void MDC2_Update(MDC2_CTX *c, const unsigned char *data, unsigned long len); void MDC2_Final(unsigned char *md, MDC2_CTX *c); -unsigned char *MDC2(unsigned char *d, unsigned long n, unsigned char *md); +unsigned char *MDC2(const unsigned char *d, unsigned long n, + unsigned char *md); #ifdef __cplusplus } diff --git a/crypto/mdc2/mdc2_one.c b/crypto/mdc2/mdc2_one.c index 1c3a093c39..6cd141b4d6 100644 --- a/crypto/mdc2/mdc2_one.c +++ b/crypto/mdc2/mdc2_one.c @@ -60,7 +60,7 @@ #include "cryptlib.h" #include <openssl/mdc2.h> -unsigned char *MDC2(unsigned char *d, unsigned long n, unsigned char *md) +unsigned char *MDC2(const unsigned char *d, unsigned long n, unsigned char *md) { MDC2_CTX c; static unsigned char m[MDC2_DIGEST_LENGTH]; diff --git a/crypto/mdc2/mdc2dgst.c b/crypto/mdc2/mdc2dgst.c index aed715c69d..c630a24c2e 100644 --- a/crypto/mdc2/mdc2dgst.c +++ b/crypto/mdc2/mdc2dgst.c @@ -74,7 +74,7 @@ *((c)++)=(unsigned char)(((l)>>16L)&0xff), \ *((c)++)=(unsigned char)(((l)>>24L)&0xff)) -static void mdc2_body(MDC2_CTX *c, unsigned char *in, unsigned int len); +static void mdc2_body(MDC2_CTX *c, const unsigned char *in, unsigned int len); void MDC2_Init(MDC2_CTX *c) { c->num=0; @@ -83,7 +83,7 @@ void MDC2_Init(MDC2_CTX *c) memset(&(c->hh[0]),0x25,MDC2_BLOCK); } -void MDC2_Update(MDC2_CTX *c, register unsigned char *in, unsigned long len) +void MDC2_Update(MDC2_CTX *c, const unsigned char *in, unsigned long len) { int i,j; @@ -118,7 +118,7 @@ void MDC2_Update(MDC2_CTX *c, register unsigned char *in, unsigned long len) } } -static void mdc2_body(MDC2_CTX *c, unsigned char *in, unsigned int len) +static void mdc2_body(MDC2_CTX *c, const unsigned char *in, unsigned int len) { register DES_LONG tin0,tin1; register DES_LONG ttin0,ttin1; |