2 * Copyright (C) 1993 Branko Lankester
3 * Copyright (C) 1993 Colin Plumb
4 * Copyright (C) 1995 Erik Troan
5 * Copyright (C) 2004 John Ellis
6 * Copyright (C) 2008 - 2016 The Geeqie Team
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 * This code implements the MD5 message-digest algorithm.
23 * The algorithm is due to Ron Rivest. This code was
24 * written by Colin Plumb in 1993, no copyright is claimed.
25 * This code is in the public domain; do with it what you wish.
27 * Equivalent code is available from RSA Data Security, Inc.
28 * This code has been tested against that, and is equivalent,
29 * except that you don't need to include two pages of legalese
32 * To compute the message digest of a chunk of bytes, declare an
33 * MD5Context structure, pass it to md5_init, call md5_update as
34 * needed on buffers full of bytes, and then call md5_Final, which
35 * will fill a supplied 16-byte array with the digest.
45 * @headerfile md5_get_string
46 * generate digest from memory buffer as a hexadecimal string
48 gchar *md5_get_string(const guchar *buffer, gint buffer_size);
51 * @headerfile md5_get_digest_from_file
52 * generate digest from file
54 gboolean md5_get_digest_from_file(const gchar *path, guchar digest[16]);
57 * @headerfile md5_get_string_from_file
58 * generate digest from file as a hexadecimal string
60 gchar *md5_get_string_from_file(const gchar *path);
63 * @headerfile md5_digest_to_text
64 * convert digest to a NULL terminated text string, in ascii encoding
66 gchar *md5_digest_to_text(const guchar digest[16]);
69 * @headerfile md5_digest_from_text
70 * convert digest from a NULL terminated text string, in ascii encoding
72 gboolean md5_digest_from_text(const gchar *text, guchar digest[16]);
75 #endif /* MD5_UTILS_H */
76 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */