mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
minor tweaks to private md5 interface
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
#ifndef FLAC__PRIVATE__MD5_H
|
||||
#define FLAC__PRIVATE__MD5_H
|
||||
|
||||
/*
|
||||
* This is the header file for the MD5 message-digest algorithm.
|
||||
* The algorithm is due to Ron Rivest. This code was
|
||||
@@ -20,29 +23,22 @@
|
||||
* Still in the public domain.
|
||||
*
|
||||
* Josh Coalson: made some changes to integrate with libFLAC.
|
||||
* Still in the public domain.
|
||||
* Still in the public domain, with no warranty.
|
||||
*/
|
||||
|
||||
#ifndef FLAC__PRIVATE__MD5_H
|
||||
#define FLAC__PRIVATE__MD5_H
|
||||
|
||||
#define md5byte unsigned char
|
||||
|
||||
#include "FLAC/ordinals.h"
|
||||
|
||||
struct FLAC__MD5Context {
|
||||
typedef struct {
|
||||
FLAC__uint32 buf[4];
|
||||
FLAC__uint32 bytes[2];
|
||||
FLAC__uint32 in[16];
|
||||
FLAC__byte *internal_buf;
|
||||
unsigned capacity;
|
||||
};
|
||||
} FLAC__MD5Context;
|
||||
|
||||
void FLAC__MD5Init(struct FLAC__MD5Context *context);
|
||||
void FLAC__MD5Update(struct FLAC__MD5Context *context, md5byte const *buf, unsigned len);
|
||||
void FLAC__MD5Final(md5byte digest[16], struct FLAC__MD5Context *context);
|
||||
void FLAC__MD5Transform(FLAC__uint32 buf[4], FLAC__uint32 const in[16]);
|
||||
void FLAC__MD5Init(FLAC__MD5Context *context);
|
||||
void FLAC__MD5Final(FLAC__byte digest[16], FLAC__MD5Context *context);
|
||||
|
||||
FLAC__bool FLAC__MD5Accumulate(struct FLAC__MD5Context *ctx, const FLAC__int32 * const signal[], unsigned channels, unsigned samples, unsigned bytes_per_sample);
|
||||
FLAC__bool FLAC__MD5Accumulate(FLAC__MD5Context *ctx, const FLAC__int32 * const signal[], unsigned channels, unsigned samples, unsigned bytes_per_sample);
|
||||
|
||||
#endif /* !MD5_H */
|
||||
#endif
|
||||
|
||||
@@ -192,7 +192,7 @@ typedef struct FLAC__StreamDecoderPrivate {
|
||||
FLAC__bool do_md5_checking; /* initially gets protected_->md5_checking but is turned off after a seek or if the metadata has a zero MD5 */
|
||||
FLAC__bool internal_reset_hack; /* used only during init() so we can call reset to set up the decoder without rewinding the input */
|
||||
FLAC__bool is_seeking;
|
||||
struct FLAC__MD5Context md5context;
|
||||
FLAC__MD5Context md5context;
|
||||
FLAC__byte computed_md5sum[16]; /* this is the sum we computed from the decoded data */
|
||||
/* (the rest of these are only used for seeking) */
|
||||
FLAC__Frame last_frame; /* holds the info of the last frame we seeked to */
|
||||
|
||||
@@ -361,7 +361,7 @@ typedef struct FLAC__StreamEncoderPrivate {
|
||||
FLAC__StreamMetadata_SeekTable *seek_table; /* pointer into encoder->protected_->metadata_ where the seek table is */
|
||||
unsigned current_sample_number;
|
||||
unsigned current_frame_number;
|
||||
struct FLAC__MD5Context md5context;
|
||||
FLAC__MD5Context md5context;
|
||||
FLAC__CPUInfo cpuinfo;
|
||||
#ifndef FLAC__INTEGER_ONLY_LIBRARY
|
||||
unsigned (*local_fixed_compute_best_predictor)(const FLAC__int32 data[], unsigned data_len, FLAC__float residual_bits_per_sample[FLAC__MAX_FIXED_ORDER+1]);
|
||||
|
||||
Reference in New Issue
Block a user