1c74663799493f2b1e6123c18def94295d0afab7Kenny Root#ifndef FLAC__PRIVATE__MD5_H 2c74663799493f2b1e6123c18def94295d0afab7Kenny Root#define FLAC__PRIVATE__MD5_H 3c74663799493f2b1e6123c18def94295d0afab7Kenny Root 4c74663799493f2b1e6123c18def94295d0afab7Kenny Root/* 5c74663799493f2b1e6123c18def94295d0afab7Kenny Root * This is the header file for the MD5 message-digest algorithm. 6c74663799493f2b1e6123c18def94295d0afab7Kenny Root * The algorithm is due to Ron Rivest. This code was 7c74663799493f2b1e6123c18def94295d0afab7Kenny Root * written by Colin Plumb in 1993, no copyright is claimed. 8c74663799493f2b1e6123c18def94295d0afab7Kenny Root * This code is in the public domain; do with it what you wish. 9c74663799493f2b1e6123c18def94295d0afab7Kenny Root * 10c74663799493f2b1e6123c18def94295d0afab7Kenny Root * Equivalent code is available from RSA Data Security, Inc. 11c74663799493f2b1e6123c18def94295d0afab7Kenny Root * This code has been tested against that, and is equivalent, 12c74663799493f2b1e6123c18def94295d0afab7Kenny Root * except that you don't need to include two pages of legalese 13c74663799493f2b1e6123c18def94295d0afab7Kenny Root * with every copy. 14c74663799493f2b1e6123c18def94295d0afab7Kenny Root * 15c74663799493f2b1e6123c18def94295d0afab7Kenny Root * To compute the message digest of a chunk of bytes, declare an 16c74663799493f2b1e6123c18def94295d0afab7Kenny Root * MD5Context structure, pass it to MD5Init, call MD5Update as 17c74663799493f2b1e6123c18def94295d0afab7Kenny Root * needed on buffers full of bytes, and then call MD5Final, which 18c74663799493f2b1e6123c18def94295d0afab7Kenny Root * will fill a supplied 16-byte array with the digest. 19c74663799493f2b1e6123c18def94295d0afab7Kenny Root * 20c74663799493f2b1e6123c18def94295d0afab7Kenny Root * Changed so as no longer to depend on Colin Plumb's `usual.h' 21c74663799493f2b1e6123c18def94295d0afab7Kenny Root * header definitions; now uses stuff from dpkg's config.h 22c74663799493f2b1e6123c18def94295d0afab7Kenny Root * - Ian Jackson <ijackson@nyx.cs.du.edu>. 23c74663799493f2b1e6123c18def94295d0afab7Kenny Root * Still in the public domain. 24c74663799493f2b1e6123c18def94295d0afab7Kenny Root * 25c74663799493f2b1e6123c18def94295d0afab7Kenny Root * Josh Coalson: made some changes to integrate with libFLAC. 26c74663799493f2b1e6123c18def94295d0afab7Kenny Root * Still in the public domain, with no warranty. 27c74663799493f2b1e6123c18def94295d0afab7Kenny Root */ 28c74663799493f2b1e6123c18def94295d0afab7Kenny Root 29c74663799493f2b1e6123c18def94295d0afab7Kenny Root#include "FLAC/ordinals.h" 30c74663799493f2b1e6123c18def94295d0afab7Kenny Root 31c74663799493f2b1e6123c18def94295d0afab7Kenny Roottypedef struct { 32c74663799493f2b1e6123c18def94295d0afab7Kenny Root FLAC__uint32 in[16]; 33c74663799493f2b1e6123c18def94295d0afab7Kenny Root FLAC__uint32 buf[4]; 34c74663799493f2b1e6123c18def94295d0afab7Kenny Root FLAC__uint32 bytes[2]; 35c74663799493f2b1e6123c18def94295d0afab7Kenny Root FLAC__byte *internal_buf; 36c74663799493f2b1e6123c18def94295d0afab7Kenny Root size_t capacity; 37c74663799493f2b1e6123c18def94295d0afab7Kenny Root} FLAC__MD5Context; 38c74663799493f2b1e6123c18def94295d0afab7Kenny Root 39c74663799493f2b1e6123c18def94295d0afab7Kenny Rootvoid FLAC__MD5Init(FLAC__MD5Context *context); 40c74663799493f2b1e6123c18def94295d0afab7Kenny Rootvoid FLAC__MD5Final(FLAC__byte digest[16], FLAC__MD5Context *context); 41c74663799493f2b1e6123c18def94295d0afab7Kenny Root 42c74663799493f2b1e6123c18def94295d0afab7Kenny RootFLAC__bool FLAC__MD5Accumulate(FLAC__MD5Context *ctx, const FLAC__int32 * const signal[], unsigned channels, unsigned samples, unsigned bytes_per_sample); 43c74663799493f2b1e6123c18def94295d0afab7Kenny Root 44c74663799493f2b1e6123c18def94295d0afab7Kenny Root#endif 45