Click here to Skip to main content
15,897,291 members
Articles / Programming Languages / C++

CMD5: A C++ Message Digest 5 Class

Rate me:
Please Sign up or sign in to vote.
4.74/5 (30 votes)
9 Jan 2001 276.5K   4.2K   88  
This C++ class serves as a wrapper for the Message Digest 5 code described in the Internet RFC 1321.
//See internet RFC 1321, "The MD5 Message-Digest Algorithm"
/* GLOBAL.H - RSAREF types and constants
 */

#ifndef _MD5_GLOBAL_H
#define _MD5_GLOBAL_H

/* PROTOTYPES should be set to one if and only if the compiler supports
  function argument prototyping.
The following makes PROTOTYPES default to 0 if it has not already

  been defined with C compiler flags.
 */
#ifndef PROTOTYPES
#define PROTOTYPES 1
#endif

/* POINTER defines a generic pointer type */
typedef unsigned char *POINTER;

/* UINT2 defines a two byte word */
typedef unsigned short int UINT2;

/* UINT4 defines a four byte word */
typedef unsigned long int UINT4;

/* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
  returns an empty list.
 */
#if PROTOTYPES
#define PROTO_LIST(list) list
#else
#define PROTO_LIST(list) ()
#endif

#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
just another c++ developer, except that im really
old, almost 51!

Comments and Discussions