flac_private_md5.h 1.5 KB

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