~ubuntu-branches/ubuntu/quantal/flac/quantal

« back to all changes in this revision

Viewing changes to src/libFLAC/include/private/md5.h

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2007-12-06 16:57:20 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20071206165720-ldii5tm8dq6zxg0l
Tags: 1.2.1-1ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/control: xmms-dev dropped to allow xmms to move to universe,
    adjust maintainer field.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef FLAC__PRIVATE__MD5_H
 
2
#define FLAC__PRIVATE__MD5_H
 
3
 
1
4
/*
2
5
 * This is the header file for the MD5 message-digest algorithm.
3
6
 * The algorithm is due to Ron Rivest.  This code was
20
23
 * Still in the public domain.
21
24
 *
22
25
 * Josh Coalson: made some changes to integrate with libFLAC.
23
 
 * Still in the public domain.
 
26
 * Still in the public domain, with no warranty.
24
27
 */
25
28
 
26
 
#ifndef FLAC__PRIVATE__MD5_H
27
 
#define FLAC__PRIVATE__MD5_H
28
 
 
29
 
#define md5byte unsigned char
30
 
 
31
29
#include "FLAC/ordinals.h"
32
30
 
33
 
struct FLAC__MD5Context {
 
31
typedef struct {
 
32
        FLAC__uint32 in[16];
34
33
        FLAC__uint32 buf[4];
35
34
        FLAC__uint32 bytes[2];
36
 
        FLAC__uint32 in[16];
37
35
        FLAC__byte *internal_buf;
38
 
        unsigned capacity;
39
 
};
40
 
 
41
 
void FLAC__MD5Init(struct FLAC__MD5Context *context);
42
 
void FLAC__MD5Update(struct FLAC__MD5Context *context, md5byte const *buf, unsigned len);
43
 
void FLAC__MD5Final(md5byte digest[16], struct FLAC__MD5Context *context);
44
 
void FLAC__MD5Transform(FLAC__uint32 buf[4], FLAC__uint32 const in[16]);
45
 
 
46
 
FLAC__bool FLAC__MD5Accumulate(struct FLAC__MD5Context *ctx, const FLAC__int32 * const signal[], unsigned channels, unsigned samples, unsigned bytes_per_sample);
47
 
 
48
 
#endif /* !MD5_H */
 
36
        size_t capacity;
 
37
} FLAC__MD5Context;
 
38
 
 
39
void FLAC__MD5Init(FLAC__MD5Context *context);
 
40
void FLAC__MD5Final(FLAC__byte digest[16], FLAC__MD5Context *context);
 
41
 
 
42
FLAC__bool FLAC__MD5Accumulate(FLAC__MD5Context *ctx, const FLAC__int32 * const signal[], unsigned channels, unsigned samples, unsigned bytes_per_sample);
 
43
 
 
44
#endif