mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-22 11:17:19 +00:00
Added "const" to the arguments here and there.
This commit is contained in:
parent
2bf7ffc485
commit
4385de1699
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=4245
@ -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_ */
|
||||
|
@ -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];
|
||||
|
@ -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_ */
|
||||
|
@ -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;
|
||||
|
@ -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_ */
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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_ */
|
||||
|
Loading…
Reference in New Issue
Block a user