From 5b66578f71a43374d299717bada94d91d57b2cc4 Mon Sep 17 00:00:00 2001 From: Ari Koivula Date: Fri, 18 Mar 2016 13:13:35 +0200 Subject: [PATCH] Add kvz_ prefix to md5 functions The non kvz_ symbols were being exported in the static lib, which got caught by Travis tests. --- src/extras/libmd5.c | 12 ++++++------ src/extras/libmd5.h | 6 +++--- src/strategies/generic/nal-generic.c | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/extras/libmd5.c b/src/extras/libmd5.c index aa44c1aa..dc22f043 100644 --- a/src/extras/libmd5.c +++ b/src/extras/libmd5.c @@ -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]) diff --git a/src/extras/libmd5.h b/src/extras/libmd5.h index 4fc32f4c..e21cf19c 100644 --- a/src/extras/libmd5.h +++ b/src/extras/libmd5.h @@ -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 diff --git a/src/strategies/generic/nal-generic.c b/src/strategies/generic/nal-generic.c index f236926c..ad8fb0c0 100644 --- a/src/strategies/generic/nal-generic.c +++ b/src/strategies/generic/nal-generic.c @@ -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,