Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
flac
Commits
099a2893
Commit
099a2893
authored
Mar 14, 2007
by
Josh Coalson
Browse files
minor tweaks to private md5 interface
parent
f299910d
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/libFLAC/include/private/md5.h
View file @
099a2893
#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__MD5Contex
t
{
typedef
struc
t
{
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
src/libFLAC/stream_decoder.c
View file @
099a2893
...
...
@@ -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 */
...
...
src/libFLAC/stream_encoder.c
View file @
099a2893
...
...
@@ -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
]);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment