From 60ffc08547476781f9b3f61c344af13fbad13ec5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 14 Nov 2014 11:53:27 +0100 Subject: Cleanup: use BLI_hash_ prefix for md5 api --- source/blender/blenlib/BLI_hash_md5.h | 6 +++--- source/blender/blenlib/intern/hash_md5.c | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'source/blender/blenlib') diff --git a/source/blender/blenlib/BLI_hash_md5.h b/source/blender/blenlib/BLI_hash_md5.h index 81a0eb9e828..544ae753793 100644 --- a/source/blender/blenlib/BLI_hash_md5.h +++ b/source/blender/blenlib/BLI_hash_md5.h @@ -30,14 +30,14 @@ * output yields to the wanted ASCII representation of the message * digest. */ -void *md5_buffer(const char *buffer, size_t len, void *resblock); +void *BLI_hash_md5_buffer(const char *buffer, size_t len, void *resblock); /* Compute MD5 message digest for bytes read from STREAM. The * resulting message digest number will be written into the 16 bytes * beginning at RESBLOCK. */ -int md5_stream(FILE *stream, void *resblock); +int BLI_hash_md5_stream(FILE *stream, void *resblock); -char *md5_to_hexdigest(void *resblock, char r_hex_digest[33]); +char *BLI_hash_md5_to_hexdigest(void *resblock, char r_hex_digest[33]); #endif /* __BLI_HASH_MD5_H__ */ diff --git a/source/blender/blenlib/intern/hash_md5.c b/source/blender/blenlib/intern/hash_md5.c index 43019781577..bc7a495f213 100644 --- a/source/blender/blenlib/intern/hash_md5.c +++ b/source/blender/blenlib/intern/hash_md5.c @@ -77,7 +77,8 @@ #endif -/* Following code is low level, upon which are built up the functions 'md5_stream' and 'md5_buffer'. */ +/* Following code is low level, upon which are built up the functions + * 'BLI_hash_md5_stream' and 'BLI_hash_md5_buffer'. */ /* Structure to save state of computation between the single steps. */ struct md5_ctx @@ -284,7 +285,7 @@ static void *md5_read_ctx(const struct md5_ctx *ctx, void *resbuf) * The resulting message digest number will be written into the 16 bytes beginning at 'resblock'. * \return Non-zero if an error occurred. */ -int md5_stream(FILE *stream, void *resblock) +int BLI_hash_md5_stream(FILE *stream, void *resblock) { #define BLOCKSIZE 4096 /* Important: must be a multiple of 64. */ struct md5_ctx ctx; @@ -356,7 +357,7 @@ int md5_stream(FILE *stream, void *resblock) * The result is always in little endian byte order, so that a byte-wise output yields to the wanted * ASCII representation of the message digest. */ -void *md5_buffer(const char *buffer, size_t len, void *resblock) +void *BLI_hash_md5_buffer(const char *buffer, size_t len, void *resblock) { struct md5_ctx ctx; char restbuf[64 + 72]; @@ -390,7 +391,7 @@ void *md5_buffer(const char *buffer, size_t len, void *resblock) return md5_read_ctx(&ctx, resblock); } -char *md5_to_hexdigest(void *resblock, char r_hex_digest[33]) +char *BLI_hash_md5_to_hexdigest(void *resblock, char r_hex_digest[33]) { static const char hex_map[17] = "0123456789abcdef"; const unsigned char *p; -- cgit v1.2.3