mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 11:24:05 +00:00
Add kvz_ prefix to md5 functions
The non kvz_ symbols were being exported in the static lib, which got caught by Travis tests.
This commit is contained in:
parent
4125218cfa
commit
5b66578f71
|
@ -8,8 +8,8 @@
|
|||
* This code has been tested against that, and is functionally equivalent,
|
||||
*
|
||||
* To compute the message digest of a chunk of bytes, declare an MD5Context
|
||||
* structure, pass it to MD5Init, call MD5Update as needed on buffers full of
|
||||
* bytes, and then call MD5Final, which will fill a supplied 16-byte array with
|
||||
* structure, pass it to kvz_md5_init, call kvz_md5_update as needed on buffers full of
|
||||
* bytes, and then call kvz_md5_final, which will fill a supplied 16-byte array with
|
||||
* the digest.
|
||||
*/
|
||||
|
||||
|
@ -46,7 +46,7 @@ void byteReverse(uint32_t *buf, unsigned len)
|
|||
* Start MD5 accumulation. Set bit count to 0 and buffer to mysterious
|
||||
* initialization constants.
|
||||
*/
|
||||
void MD5Init(context_md5_t *ctx)
|
||||
void kvz_md5_init(context_md5_t *ctx)
|
||||
{
|
||||
ctx->buf[0] = 0x67452301;
|
||||
ctx->buf[1] = 0xefcdab89;
|
||||
|
@ -61,7 +61,7 @@ void MD5Init(context_md5_t *ctx)
|
|||
* Update context to reflect the concatenation of another buffer full
|
||||
* of bytes.
|
||||
*/
|
||||
void MD5Update(context_md5_t *ctx, const unsigned char *buf, unsigned len)
|
||||
void kvz_md5_update(context_md5_t *ctx, const unsigned char *buf, unsigned len)
|
||||
{
|
||||
uint32_t t;
|
||||
|
||||
|
@ -109,7 +109,7 @@ void MD5Update(context_md5_t *ctx, const unsigned char *buf, unsigned len)
|
|||
* Final wrapup - pad to 64-byte boundary with the bit pattern
|
||||
* 1 0* (64-bit count of bits processed, MSB-first)
|
||||
*/
|
||||
void MD5Final(unsigned char digest[16], context_md5_t *ctx)
|
||||
void kvz_md5_final(unsigned char digest[16], context_md5_t *ctx)
|
||||
{
|
||||
unsigned count;
|
||||
unsigned char *p;
|
||||
|
@ -169,7 +169,7 @@ void MD5Final(unsigned char digest[16], context_md5_t *ctx)
|
|||
|
||||
/*
|
||||
* The core of the MD5 algorithm, this alters an existing MD5 hash to
|
||||
* reflect the addition of 16 longwords of new data. MD5Update blocks
|
||||
* reflect the addition of 16 longwords of new data. kvz_md5_update blocks
|
||||
* the data and converts bytes into longwords for this routine.
|
||||
*/
|
||||
static void MD5Transform(uint32_t buf[4], uint32_t const in[16])
|
||||
|
|
|
@ -48,9 +48,9 @@ typedef struct _context_md5_t {
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void MD5Init(context_md5_t *ctx);
|
||||
void MD5Update(context_md5_t *ctx, const unsigned char *buf, unsigned len);
|
||||
void MD5Final(unsigned char digest[16], context_md5_t *ctx);
|
||||
void kvz_md5_init(context_md5_t *ctx);
|
||||
void kvz_md5_update(context_md5_t *ctx, const unsigned char *buf, unsigned len);
|
||||
void kvz_md5_final(unsigned char digest[16], context_md5_t *ctx);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -35,12 +35,12 @@ static void array_md5_generic(const kvz_pixel* data,
|
|||
assert(SEI_HASH_MAX_LENGTH >= 16);
|
||||
|
||||
context_md5_t md5_ctx;
|
||||
MD5Init(&md5_ctx);
|
||||
kvz_md5_init(&md5_ctx);
|
||||
|
||||
unsigned bytes = width * height * sizeof(kvz_pixel);
|
||||
MD5Update(&md5_ctx, (const unsigned char *)data, bytes);
|
||||
kvz_md5_update(&md5_ctx, (const unsigned char *)data, bytes);
|
||||
|
||||
MD5Final(checksum_out, &md5_ctx);
|
||||
kvz_md5_final(checksum_out, &md5_ctx);
|
||||
}
|
||||
|
||||
static void array_checksum_generic(const kvz_pixel* data,
|
||||
|
|
Loading…
Reference in a new issue