Make the MD* header files C++-aware. Also, string arguments are supposed

to be of type `const char *'.

PR:		3291
Submitted by:	dima@tejblum.dnttm.rssi.ru (Dmitrij Tejblum)
This commit is contained in:
Joerg Wunsch 1997-08-25 05:24:31 +00:00
parent daca865092
commit f778764443
6 changed files with 26 additions and 12 deletions

View File

@ -1,5 +1,5 @@
/* MD2.H - header file for MD2C.C
* $Id$
* $Id: md2.h,v 1.5 1997/02/22 15:07:12 peter Exp $
*/
/* Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All
@ -30,11 +30,15 @@ typedef struct MD2Context {
unsigned char buffer[16]; /* input buffer */
} MD2_CTX;
#include <sys/cdefs.h>
__BEGIN_DECLS
void MD2Init(MD2_CTX *);
void MD2Update(MD2_CTX *, const unsigned char *, unsigned int);
void MD2Final(unsigned char [16], MD2_CTX *);
char * MD2End(MD2_CTX *, char *);
char * MD2File(char *, char *);
char * MD2File(const char *, char *);
char * MD2Data(const unsigned char *, unsigned int, char *);
__END_DECLS
#endif /* _MD2_H_ */

View File

@ -1,5 +1,5 @@
/* MD4.H - header file for MD4C.C
* $Id$
* $Id: md4.h,v 1.6 1997/02/22 15:07:17 peter Exp $
*/
/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
@ -32,11 +32,15 @@ typedef struct MD4Context {
unsigned char buffer[64]; /* input buffer */
} MD4_CTX;
#include <sys/cdefs.h>
__BEGIN_DECLS
void MD4Init(MD4_CTX *);
void MD4Update(MD4_CTX *, const unsigned char *, unsigned int);
void MD4Final(unsigned char [16], MD4_CTX *);
char * MD4End(MD4_CTX *, char *);
char * MD4File(char *, char *);
char * MD4File(const char *, char *);
char * MD4Data(const unsigned char *, unsigned int, char *);
__END_DECLS
#endif /* _MD4_H_ */

View File

@ -6,7 +6,7 @@
.\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
.\" ----------------------------------------------------------------------------
.\"
.\" $Id: mdX.3,v 1.9 1997/02/22 15:07:22 peter Exp $
.\" $Id: mdX.3,v 1.10 1997/03/19 00:52:58 bde Exp $
.\"
.Dd October 9, 1996
.Dt MDX 3
@ -31,7 +31,7 @@
.Ft "char *"
.Fn MDXEnd "MDX_CTX *context" "char *buf"
.Ft "char *"
.Fn MDXFile "char *filename" "char *buf"
.Fn MDXFile "const char *filename" "char *buf"
.Ft "char *"
.Fn MDXData "const unsigned char *data" "unsigned int len" "char *buf"
.Sh DESCRIPTION

View File

@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
* $Id$
* $Id: mdXhl.c,v 1.10 1997/02/22 15:07:23 peter Exp $
*
*/
@ -41,7 +41,7 @@ MDXEnd(MDX_CTX *ctx, char *buf)
}
char *
MDXFile (char *filename, char *buf)
MDXFile (const char *filename, char *buf)
{
unsigned char buffer[BUFSIZ];
MDX_CTX ctx;

View File

@ -1,5 +1,5 @@
/* MDDRIVER.C - test driver for MD2, MD4 and MD5
* $Id$
* $Id: mddriver.c,v 1.3 1997/02/22 15:07:24 peter Exp $
*/
/* Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All
@ -18,9 +18,11 @@
defined with C compiler flags.
*/
#ifndef MD
#define MD MD5
#define MD 5
#endif
#include <sys/types.h>
#include <stdio.h>
#include <time.h>
#include <string.h>

View File

@ -1,5 +1,5 @@
/* MD5.H - header file for MD5C.C
* $Id$
* $Id: md5.h,v 1.8 1997/02/22 09:45:33 peter Exp $
*/
/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
@ -33,10 +33,14 @@ typedef struct MD5Context {
unsigned char buffer[64]; /* input buffer */
} MD5_CTX;
#include <sys/cdefs.h>
__BEGIN_DECLS
void MD5Init (MD5_CTX *);
void MD5Update (MD5_CTX *, const unsigned char *, unsigned int);
void MD5Final (unsigned char [16], MD5_CTX *);
char * MD5End(MD5_CTX *, char *);
char * MD5File(char *, char *);
char * MD5File(const char *, char *);
char * MD5Data(const unsigned char *, unsigned int, char *);
__END_DECLS
#endif /* _SYS_MD5_H_ */