This manual page is for Mac OS X version 10.6

If you are running a different version of Mac OS X, view the documentation locally:

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • For more information about the manual page format, see the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Reference Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.



CC_MD5(3cc)                                         LOCAL                                        CC_MD5(3cc)

NAME
     CC_MD2_Init CC_MD2_Update CC_MD2_Final CC_MD2

     CC_MD4_Init CC_MD4_Update CC_MD4_Final CC_MD4

     CC_MD5_Init CC_MD5_Update CC_MD5_Final CC_MD5

     -- MD2, MD4, and MD5 hash functions

SYNOPSIS
     #include <CommonCrypto/CommonDigest.h>

     extern int
     CC_MD2_Init(CC_MD2_CTX *c);

     extern int
     CC_MD2_Update(CC_MD2_CTX *c, const void *data, CC_LONG len);

     extern int
     CC_MD2_Final(unsigned char *md, CC_MD2_CTX *c);

     extern unsigned char *
     CC_MD2(const void *data, CC_LONG len, unsigned char *md);

     extern int
     CC_MD4_Init(CC_MD4_CTX *c);

     extern int
     CC_MD4_Update(CC_MD4_CTX *c, const void *data, CC_LONG len);

     extern int
     CC_MD4_Final(unsigned char *md, CC_MD4_CTX *c);

     extern unsigned char *
     CC_MD4(const void *data, CC_LONG len, unsigned char *md);

     extern int
     CC_MD5_Init(CC_MD5_CTX *c);

     extern int
     CC_MD5_Update(CC_MD5_CTX *c, const void *data, CC_LONG len);

     extern int
     CC_MD5_Final(unsigned char *md, CC_MD5_CTX *c);

     extern unsigned char *
     CC_MD5(const void *data, CC_LONG len, unsigned char *md);

DESCRIPTION
     The following functions are used to produce an hash from data:

     CC_MD2_Init() initializes a CC_MD2_CTX structure.

     CC_MD2_Update() can be called repeatedly with chunks of the message to be hashed (len bytes at data).

     CC_MD2_Final() places the MD2 message digest in md, which must have space for CC_MD2_DIGEST_LENGTH ==
     16 bytes of output, and erases the CC_MD2_CTX.

     CC_MD2() computes the MD2 message digest of the len bytes at data and places it in md (which must have
     space for CC_MD2_DIGEST_LENGTH == 16 bytes of output). It returns the md pointer.

     CC_MD4_Init(), CC_MD4_Update(), CC_MD4_Final(), CC_MD4(), CC_MD5_Init(), CC_MD5_Update(),
     CC_MD5_Final(), and CC_MD5() are analogous using an CC_MD4_CTX and CC_MD5_CTX structure.

NOTE
     MD2, MD4, and MD5 are recommended only for compatibility with existing applications. In new applica-tions, applications,
     tions, SHA-256(or greater) should be preferred.

RETURN VALUES
     All routines return 1 except for the one-shot routines ( CC_MD2() , etc.), which return the pointer
     passed in via the md parameter.

CONFORMING TO
     RFC 1319, RFC 1320, RFC 1321

SEE ALSO
     CC_crypto(3cc), CC_SHA(3cc), CCHmac(3cc), CCCryptor(3cc)

HISTORY
     These functions are available in OS X 10.4 and later.

     These functions provide similar functionality to the routines found in OpenSSL 0.9.6 and may use the
     same implementation.

BSD                                             April 5, 2007                                            BSD

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation with the feedback links below.
Bug reports
Report bugs in the functionality of the described tool or API through Bug Reporter.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.