use GCheckSum instead of the MD5 routine from libgimpmath.
2008-03-28 Sven Neumann <sven@gimp.org> * libgimpthumb/gimpthumb-utils.c (gimp_thumb_png_name): use GCheckSum instead of the MD5 routine from libgimpmath. * gimpthumb.pc.in * libgimpthumb/Makefile.am: removed libgimpmath dependency from libgimpthumb. svn path=/trunk/; revision=25287
This commit is contained in:

committed by
Sven Neumann

parent
369738ea5b
commit
8203e1ac50
@ -1,3 +1,12 @@
|
||||
2008-03-28 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimpthumb/gimpthumb-utils.c (gimp_thumb_png_name): use
|
||||
GCheckSum instead of the MD5 routine from libgimpmath.
|
||||
|
||||
* gimpthumb.pc.in
|
||||
* libgimpthumb/Makefile.am: removed libgimpmath dependency from
|
||||
libgimpthumb.
|
||||
|
||||
2008-03-28 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/sanity.c (sanity_check_glib): bumped glib version.
|
||||
|
@ -7,5 +7,5 @@ Name: GIMP Thumb
|
||||
Description: GIMP Thumbnail Library
|
||||
Version: @GIMP_REAL_VERSION@
|
||||
Requires: gdk-pixbuf-2.0
|
||||
Libs: -L${libdir} -lgimpthumb-@GIMP_API_VERSION@ -lgimpmath-@GIMP_API_VERSION@
|
||||
Libs: -L${libdir} -lgimpthumb-@GIMP_API_VERSION@
|
||||
Cflags: -I${includedir}/gimp-@GIMP_API_VERSION@
|
||||
|
@ -1,7 +1,5 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
libgimpmath = $(top_builddir)/libgimpmath/libgimpmath-$(GIMP_API_VERSION).la
|
||||
|
||||
if PLATFORM_WIN32
|
||||
no_undefined = -no-undefined
|
||||
endif
|
||||
@ -81,7 +79,7 @@ libgimpthumb_2_0_la_LDFLAGS = \
|
||||
$(no_undefined) \
|
||||
$(libgimpthumb_export_symbols)
|
||||
|
||||
libgimpthumb_2_0_la_LIBADD = $(libgimpmath) $(GDK_PIXBUF_LIBS) $(GLIB_LIBS)
|
||||
libgimpthumb_2_0_la_LIBADD = $(GDK_PIXBUF_LIBS) $(GLIB_LIBS)
|
||||
|
||||
|
||||
noinst_PROGRAMS = gimp-thumbnail-list
|
||||
|
@ -40,8 +40,6 @@
|
||||
#include "libgimpbase/gimpwin32-io.h"
|
||||
#endif
|
||||
|
||||
#include "libgimpmath/gimpmath.h"
|
||||
|
||||
#include "gimpthumb-error.h"
|
||||
#include "gimpthumb-types.h"
|
||||
#include "gimpthumb-utils.h"
|
||||
@ -763,14 +761,21 @@ static const gchar *
|
||||
gimp_thumb_png_name (const gchar *uri)
|
||||
{
|
||||
static gchar name[40];
|
||||
guchar digest[16];
|
||||
guchar n;
|
||||
gint i;
|
||||
|
||||
gimp_md5_get_digest (uri, -1, digest);
|
||||
GChecksum *checksum;
|
||||
guchar digest[16];
|
||||
gsize len = sizeof (digest);
|
||||
gsize i;
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
checksum = g_checksum_new (G_CHECKSUM_MD5);
|
||||
g_checksum_update (checksum, (const guchar *) uri, -1);
|
||||
g_checksum_get_digest (checksum, digest, &len);
|
||||
g_checksum_free (checksum);
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
guchar n;
|
||||
|
||||
n = (digest[i] >> 4) & 0xF;
|
||||
name[i * 2] = (n > 9) ? 'a' + n - 10 : '0' + n;
|
||||
|
||||
|
Reference in New Issue
Block a user