From 5ab78ec86380f306e30b6ac419a0e7bcb21dadbe Mon Sep 17 00:00:00 2001 From: Minje Ahn Date: Fri, 18 Mar 2016 13:26:41 +0900 Subject: [PATCH] Change md5 api name(for as-needed option) Change-Id: I060ff9a05d65656d1312edf6d92c636a5029296c Signed-off-by: Minje Ahn --- md5/md5.c | 6 +++--- md5/md5.h | 7 +++---- md5/media-thumb-hash.c | 6 +++--- packaging/libmedia-thumbnail.spec | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/md5/md5.c b/md5/md5.c index 9604a80..c223cfe 100755 --- a/md5/md5.c +++ b/md5/md5.c @@ -46,7 +46,7 @@ void byteReverse(unsigned char *buf, unsigned longs) * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious * initialization constants. */ -void MD5Init(MD5_CTX *ctx) +void media_thumb_MD5Init(MD5_CTX *ctx) { ctx->buf[0] = 0x67452301; ctx->buf[1] = 0xefcdab89; @@ -61,7 +61,7 @@ void MD5Init(MD5_CTX *ctx) * Update context to reflect the concatenation of another buffer full * of bytes. */ -void MD5Update(MD5_CTX *ctx, unsigned char const *buf, unsigned len) +void media_thumb_MD5Update(MD5_CTX *ctx, unsigned char const *buf, unsigned len) { uint32_t t; @@ -111,7 +111,7 @@ void MD5Update(MD5_CTX *ctx, unsigned char const *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], MD5_CTX *ctx) +void media_thumb_MD5Final(unsigned char digest[16], MD5_CTX *ctx) { unsigned count; unsigned char *p; diff --git a/md5/md5.h b/md5/md5.h index dac53fb..7cc0a35 100644 --- a/md5/md5.h +++ b/md5/md5.h @@ -30,10 +30,9 @@ typedef struct MD5Context { unsigned char in[64]; } MD5_CTX; -extern void MD5Init(MD5_CTX *context); -extern void MD5Update(MD5_CTX *context,unsigned char const *buf,unsigned len); -extern void MD5Final(unsigned char digest[MD5_HASHBYTES], MD5_CTX *context); - +extern void media_thumb_MD5Init(MD5_CTX *context); +extern void media_thumb_MD5Update(MD5_CTX *context,unsigned char const *buf,unsigned len); +extern void media_thumb_MD5Final(unsigned char digest[MD5_HASHBYTES], MD5_CTX *context); extern void MD5Transform(uint32_t buf[4], uint32_t const in[16]); #endif diff --git a/md5/media-thumb-hash.c b/md5/media-thumb-hash.c index 5e1ffb1..abd4fda 100644 --- a/md5/media-thumb-hash.c +++ b/md5/media-thumb-hash.c @@ -93,9 +93,9 @@ char *_media_thumb_generate_hash_name(const char *file) memset(&ctx, 0x00, sizeof(MD5_CTX)); - MD5Init(&ctx); - MD5Update(&ctx, (unsigned char const *)uri, (unsigned)strlen(uri)); - MD5Final(hash, &ctx); + media_thumb_MD5Init(&ctx); + media_thumb_MD5Update(&ctx, (unsigned char const *)uri, (unsigned)strlen(uri)); + media_thumb_MD5Final(hash, &ctx); for (n = 0; n < MD5_HASHBYTES; n++) { md5out[2 * n] = hex[hash[n] >> 4]; diff --git a/packaging/libmedia-thumbnail.spec b/packaging/libmedia-thumbnail.spec index 7573039..8ca33cb 100644 --- a/packaging/libmedia-thumbnail.spec +++ b/packaging/libmedia-thumbnail.spec @@ -1,6 +1,6 @@ Name: libmedia-thumbnail Summary: Media thumbnail service library for multimedia applications -Version: 0.1.92 +Version: 0.1.93 Release: 0 Group: Multimedia/Libraries License: Apache-2.0 and public domain -- 2.7.4