/*
+ * Copyright (C) 1993 Branko Lankester
+ * Copyright (C) 1993 Colin Plumb
+ * Copyright (C) 1995 Erik Troan
+ * Copyright (C) 2004 John Ellis
+ * Copyright (C) 2008 - 2016 The Geeqie Team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
* This code implements the MD5 message-digest algorithm.
* The algorithm is due to Ron Rivest. This code was
* written by Colin Plumb in 1993, no copyright is claimed.
* will fill a supplied 16-byte array with the digest.
*/
-/* parts of this file are :
- * Written March 1993 by Branko Lankester
- * Modified June 1993 by Colin Plumb for altered md5.c.
- * Modified October 1995 by Erik Troan for RPM
- */
-
-/*
- * Pulled from evolution for use in Geeqie, their version is nicely glib'ed
- * GNOME CVS HEAD evolution/e-util/md5-utils.[ch] September 8, 2004
- */
-
-
#include <stdio.h>
#include <string.h>
#include "md5-util.h"
-#include "ui_fileops.h" /* for utf-8 filename conversion */
-
static void md5_transform(guint32 buf[4], const guint32 in[16]);
return TRUE;
}
-/* does filename utf8 to filesystem encoding first */
-gboolean md5_get_digest_from_file_utf8(const gchar *path, guchar digest[16])
-{
- gboolean success;
- gchar *pathl;
-
- pathl = path_from_utf8(path);
- success = md5_get_digest_from_file(pathl, digest);
- g_free(pathl);
-
- return success;
-}
-
/* these to and from text string converters were borrowed from
* the libgnomeui library, where they are name thumb_digest_to/from_ascii
*
return TRUE;
}
-gchar *md5_text_from_file_utf8(const gchar *path, const gchar *error_text)
-{
- guchar digest[16];
-
- if (!md5_get_digest_from_file_utf8(path, digest)) return g_strdup(error_text);
-
- return md5_digest_to_text(digest);
-}
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */