--- pgp/src/md5.h 2018/04/24 16:38:39 1.1.1.2 +++ pgp/src/md5.h 2018/04/24 16:40:11 1.1.1.4 @@ -14,6 +14,14 @@ */ /* + * Edited 7 May 93 by CP to change the interface to match that + * of the MD5 routines in RSAREF. Due to this alteration, this + * code is "derived from the RSA Data Security, Inc. MD5 Message- + * Digest Algorithm". (See below.) Also added argument names + * to the prototypes. + */ + +/* *********************************************************************** ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. ** ** ** @@ -38,17 +46,21 @@ */ /* typedef a 32-bit type */ +#ifdef __alpha +typedef unsigned int UINT4; +#else typedef unsigned long int UINT4; +#endif /* Data structure for MD5 (Message-Digest) computation */ typedef struct { - UINT4 i[2]; /* number of _bits_ handled mod 2^64 */ UINT4 buf[4]; /* scratch buffer */ + UINT4 i[2]; /* number of _bits_ handled mod 2^64 */ unsigned char in[64]; /* input buffer */ - unsigned char digest[16]; /* actual digest after MD5Final call */ } MD5_CTX; -void MD5Init(MD5_CTX *); -void MD5Update(MD5_CTX *,unsigned char *,unsigned int); -void MD5Final(MD5_CTX *); +void MD5Init(MD5_CTX *mdContext); +void MD5Update(MD5_CTX *mdContext, unsigned char *bug, unsigned int len); +void MD5Final(unsigned char digest[16], MD5_CTX *mdContext); +void Transform(UINT4 *buf, UINT4 *in);