aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1994-11-07 20:48:35 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1994-11-07 20:48:35 +0000
commit4385de1699eedefa385d938df50441699f9664fe (patch)
tree363e9941ec227dcd459032b2e309e2bb1975a8c3
parent2bf7ffc485ff7a75dd023b6fb218bcf3a2a2ea7d (diff)
downloadsrc-4385de1699eedefa385d938df50441699f9664fe.tar.gz
src-4385de1699eedefa385d938df50441699f9664fe.zip
Added "const" to the arguments here and there.
Notes
Notes: svn path=/head/; revision=4245
-rw-r--r--lib/libmd/md2.h4
-rw-r--r--lib/libmd/md2c.c6
-rw-r--r--lib/libmd/md4.h4
-rw-r--r--lib/libmd/md4c.c10
-rw-r--r--lib/libmd/md5.h4
-rw-r--r--lib/libmd/md5c.c10
-rw-r--r--lib/libmd/mdXhl.c2
-rw-r--r--sys/kern/md5c.c10
-rw-r--r--sys/sys/md5.h4
9 files changed, 27 insertions, 27 deletions
diff --git a/lib/libmd/md2.h b/lib/libmd/md2.h
index 027641b036fe..0b81de6e41c6 100644
--- a/lib/libmd/md2.h
+++ b/lib/libmd/md2.h
@@ -31,10 +31,10 @@ typedef struct {
} MD2_CTX;
void MD2Init(MD2_CTX *);
-void MD2Update(MD2_CTX *, unsigned char *, unsigned int);
+void MD2Update(MD2_CTX *, const unsigned char *, unsigned int);
void MD2Final(unsigned char [16], MD2_CTX *);
char * MD2End(MD2_CTX *);
char * MD2File(char *);
-char * MD2Data(unsigned char *, unsigned int);
+char * MD2Data(const unsigned char *, unsigned int);
#endif /* _MD2_H_ */
diff --git a/lib/libmd/md2c.c b/lib/libmd/md2c.c
index 1d644ee993b8..a9c0607ed113 100644
--- a/lib/libmd/md2c.c
+++ b/lib/libmd/md2c.c
@@ -30,7 +30,7 @@ typedef unsigned long int UINT4;
#define PROTO_LIST(list) list
static void MD2Transform PROTO_LIST
- ((unsigned char [16], unsigned char [16], unsigned char [16]));
+ ((unsigned char [16], unsigned char [16], const unsigned char [16]));
/* Permutation of 0..255 constructed from the digits of pi. It gives a
"random" nonlinear byte substitution operation.
@@ -97,7 +97,7 @@ MD2_CTX *context; /* context */
*/
void MD2Update (context, input, inputLen)
MD2_CTX *context; /* context */
-unsigned char *input; /* input block */
+const unsigned char *input; /* input block */
unsigned int inputLen; /* length of input block */
{
unsigned int i, index, partLen;
@@ -161,7 +161,7 @@ MD2_CTX *context; /* context */
static void MD2Transform (state, checksum, block)
unsigned char state[16];
unsigned char checksum[16];
-unsigned char block[16];
+const unsigned char block[16];
{
unsigned int i, j, t;
unsigned char x[48];
diff --git a/lib/libmd/md4.h b/lib/libmd/md4.h
index 31003d044389..1c73a5d544bf 100644
--- a/lib/libmd/md4.h
+++ b/lib/libmd/md4.h
@@ -33,10 +33,10 @@ typedef struct {
} MD4_CTX;
void MD4Init(MD4_CTX *);
-void MD4Update(MD4_CTX *, unsigned char *, unsigned int);
+void MD4Update(MD4_CTX *, const unsigned char *, unsigned int);
void MD4Final(unsigned char [16], MD4_CTX *);
char * MD4End(MD4_CTX *);
char * MD4File(char *);
-char * MD4Data(unsigned char *, unsigned int);
+char * MD4Data(const unsigned char *, unsigned int);
#endif /* _MD4_H_ */
diff --git a/lib/libmd/md4c.c b/lib/libmd/md4c.c
index 07cb4e6e31ae..0f4290557fef 100644
--- a/lib/libmd/md4c.c
+++ b/lib/libmd/md4c.c
@@ -46,11 +46,11 @@ typedef unsigned long int UINT4;
#define S33 11
#define S34 15
-static void MD4Transform PROTO_LIST ((UINT4 [4], unsigned char [64]));
+static void MD4Transform PROTO_LIST ((UINT4 [4], const unsigned char [64]));
static void Encode PROTO_LIST
((unsigned char *, UINT4 *, unsigned int));
static void Decode PROTO_LIST
- ((UINT4 *, unsigned char *, unsigned int));
+ ((UINT4 *, const unsigned char *, unsigned int));
static unsigned char PADDING[64] = {
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -104,7 +104,7 @@ MD4_CTX *context; /* context */
*/
void MD4Update (context, input, inputLen)
MD4_CTX *context; /* context */
-unsigned char *input; /* input block */
+const unsigned char *input; /* input block */
unsigned int inputLen; /* length of input block */
{
unsigned int i, index, partLen;
@@ -172,7 +172,7 @@ MD4_CTX *context; /* context */
*/
static void MD4Transform (state, block)
UINT4 state[4];
-unsigned char block[64];
+const unsigned char block[64];
{
UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
@@ -266,7 +266,7 @@ unsigned int len;
static void Decode (output, input, len)
UINT4 *output;
-unsigned char *input;
+const unsigned char *input;
unsigned int len;
{
unsigned int i, j;
diff --git a/lib/libmd/md5.h b/lib/libmd/md5.h
index ea3076ceb9b6..7a1484c02309 100644
--- a/lib/libmd/md5.h
+++ b/lib/libmd/md5.h
@@ -34,9 +34,9 @@ typedef struct {
} MD5_CTX;
void MD5Init (MD5_CTX *);
-void MD5Update (MD5_CTX *, unsigned char *, unsigned int);
+void MD5Update (MD5_CTX *, const unsigned char *, unsigned int);
void MD5Final (unsigned char [16], MD5_CTX *);
char * MD5End(MD5_CTX *);
char * MD5File(char *);
-char * MD5Data(unsigned char *, unsigned int);
+char * MD5Data(const unsigned char *, unsigned int);
#endif /* _MD5_H_ */
diff --git a/lib/libmd/md5c.c b/lib/libmd/md5c.c
index 9ad3c7fc0657..ab4e60ee6158 100644
--- a/lib/libmd/md5c.c
+++ b/lib/libmd/md5c.c
@@ -51,11 +51,11 @@ typedef unsigned long int UINT4;
#define S43 15
#define S44 21
-static void MD5Transform PROTO_LIST ((UINT4 [4], unsigned char [64]));
+static void MD5Transform PROTO_LIST ((UINT4 [4], const unsigned char [64]));
static void Encode PROTO_LIST
((unsigned char *, UINT4 *, unsigned int));
static void Decode PROTO_LIST
- ((UINT4 *, unsigned char *, unsigned int));
+ ((UINT4 *, const unsigned char *, unsigned int));
static unsigned char PADDING[64] = {
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -118,7 +118,7 @@ MD5_CTX *context; /* context */
*/
void MD5Update (context, input, inputLen)
MD5_CTX *context; /* context */
-unsigned char *input; /* input block */
+const unsigned char *input; /* input block */
unsigned int inputLen; /* length of input block */
{
unsigned int i, index, partLen;
@@ -188,7 +188,7 @@ MD5_CTX *context; /* context */
*/
static void MD5Transform (state, block)
UINT4 state[4];
-unsigned char block[64];
+const unsigned char block[64];
{
UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
@@ -299,7 +299,7 @@ unsigned int len;
*/
static void Decode (output, input, len)
UINT4 *output;
-unsigned char *input;
+const unsigned char *input;
unsigned int len;
{
unsigned int i, j;
diff --git a/lib/libmd/mdXhl.c b/lib/libmd/mdXhl.c
index 6cd873f169b1..dafaec5c3382 100644
--- a/lib/libmd/mdXhl.c
+++ b/lib/libmd/mdXhl.c
@@ -57,7 +57,7 @@ MDXFile (char *filename)
}
char *
-MDXData (unsigned char *data, unsigned int len)
+MDXData (const unsigned char *data, unsigned int len)
{
unsigned char digest[16];
MDX_CTX ctx;
diff --git a/sys/kern/md5c.c b/sys/kern/md5c.c
index 9ad3c7fc0657..ab4e60ee6158 100644
--- a/sys/kern/md5c.c
+++ b/sys/kern/md5c.c
@@ -51,11 +51,11 @@ typedef unsigned long int UINT4;
#define S43 15
#define S44 21
-static void MD5Transform PROTO_LIST ((UINT4 [4], unsigned char [64]));
+static void MD5Transform PROTO_LIST ((UINT4 [4], const unsigned char [64]));
static void Encode PROTO_LIST
((unsigned char *, UINT4 *, unsigned int));
static void Decode PROTO_LIST
- ((UINT4 *, unsigned char *, unsigned int));
+ ((UINT4 *, const unsigned char *, unsigned int));
static unsigned char PADDING[64] = {
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -118,7 +118,7 @@ MD5_CTX *context; /* context */
*/
void MD5Update (context, input, inputLen)
MD5_CTX *context; /* context */
-unsigned char *input; /* input block */
+const unsigned char *input; /* input block */
unsigned int inputLen; /* length of input block */
{
unsigned int i, index, partLen;
@@ -188,7 +188,7 @@ MD5_CTX *context; /* context */
*/
static void MD5Transform (state, block)
UINT4 state[4];
-unsigned char block[64];
+const unsigned char block[64];
{
UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
@@ -299,7 +299,7 @@ unsigned int len;
*/
static void Decode (output, input, len)
UINT4 *output;
-unsigned char *input;
+const unsigned char *input;
unsigned int len;
{
unsigned int i, j;
diff --git a/sys/sys/md5.h b/sys/sys/md5.h
index ea3076ceb9b6..7a1484c02309 100644
--- a/sys/sys/md5.h
+++ b/sys/sys/md5.h
@@ -34,9 +34,9 @@ typedef struct {
} MD5_CTX;
void MD5Init (MD5_CTX *);
-void MD5Update (MD5_CTX *, unsigned char *, unsigned int);
+void MD5Update (MD5_CTX *, const unsigned char *, unsigned int);
void MD5Final (unsigned char [16], MD5_CTX *);
char * MD5End(MD5_CTX *);
char * MD5File(char *);
-char * MD5Data(unsigned char *, unsigned int);
+char * MD5Data(const unsigned char *, unsigned int);
#endif /* _MD5_H_ */