#include <libkern/crypto/md5.h>
libkern/crypto/md5.h
MD5.H - header file for MD5.C
macroMD5_DIGEST_LENGTH
#define MD5_DIGEST_LENGTH 16
structMD5_CTX
MD5 context.
| u_int32_t[4] | state | state (ABCD) |
| u_int32_t[2] | count | number of bits, modulo 2^64 (lsb first) |
| unsigned char[64] | buffer | input buffer |
typedefMD5_CTX
typedef struct MD5_CTX MD5_CTX;
functionMD5Init
extern void MD5Init(MD5_CTX *)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu libkern/crypto/corecrypto_md5.c
Initializes an MD5_CTX to begin a new MD5 message-digest computation. Part of the legacy MD5Init/MD5Update/MD5Final interface, implemented over the corecrypto ccdigest MD5 implementation. MD5 is cryptographically broken; the interface remains for compatibility with existing formats and protocols.
functionMD5Update
extern void MD5Update(MD5_CTX *, const void *, unsigned int)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu libkern/crypto/corecrypto_md5.c
Appends len bytes of data to the MD5 computation in progress in the given MD5_CTX. May be called repeatedly to digest a message in pieces; implemented over the corecrypto ccdigest MD5 implementation.
functionMD5Final
extern void MD5Final(unsigned char [MD5_DIGEST_LENGTH], MD5_CTX *)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu libkern/crypto/corecrypto_md5.c
Completes the MD5 computation in the given MD5_CTX, applying padding and length encoding, and writes the 16-byte (MD5_DIGEST_LENGTH) digest to the supplied buffer. The context contents are not meaningful afterward; call MD5Init to reuse it.