summaryrefslogtreecommitdiff
path: root/libsylph/md5.h
diff options
context:
space:
mode:
authorSimeon Simeonov2018-02-26 11:23:00 +0100
committerSimeon Simeonov2018-02-26 11:23:00 +0100
commit0b3cbf57875fd692e4ba0b336fefa4bee1ed00dc (patch)
treeaf916a30553c78ce9d4f2d8658656a175c5b6921 /libsylph/md5.h
Initial commit for sylpheed 3.7.0
Diffstat (limited to 'libsylph/md5.h')
-rw-r--r--libsylph/md5.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/libsylph/md5.h b/libsylph/md5.h
new file mode 100644
index 0000000..e50b387
--- /dev/null
+++ b/libsylph/md5.h
@@ -0,0 +1,61 @@
1/**
2
3 This code is in the public domain. See md5.c for details.
4
5 Authors:
6 Colin Plumb [original author]
7 David Helder [GNet API]
8
9 Modified the prefix of functions to prevent conflict with original GNet.
10
11 */
12
13
14#ifndef S_GNET_MD5_H
15#define S_GNET_MD5_H
16
17#include <glib.h>
18
19#ifdef __cplusplus
20extern "C" {
21#endif /* __cplusplus */
22
23/**
24 * SMD5
25 *
26 * SMD5 is a MD5 hash.
27 *
28 **/
29typedef struct _SMD5 SMD5;
30
31/**
32 * S_GNET_MD5_HASH_LENGTH
33 *
34 * Length of the MD5 hash in bytes.
35 **/
36#define S_GNET_MD5_HASH_LENGTH 16
37
38
39SMD5* s_gnet_md5_new (const guchar* buffer, guint length);
40SMD5* s_gnet_md5_new_string (const gchar* str);
41SMD5* s_gnet_md5_clone (const SMD5* md5);
42void s_gnet_md5_delete (SMD5* md5);
43
44SMD5* s_gnet_md5_new_incremental (void);
45void s_gnet_md5_update (SMD5* md5, const guchar* buffer, guint length);
46void s_gnet_md5_final (SMD5* md5);
47
48gboolean s_gnet_md5_equal (gconstpointer p1, gconstpointer p2);
49guint s_gnet_md5_hash (gconstpointer p);
50
51gchar* s_gnet_md5_get_digest (const SMD5* md5);
52gchar* s_gnet_md5_get_string (const SMD5* md5);
53
54void s_gnet_md5_copy_string (const SMD5* md5, gchar* buffer);
55
56
57#ifdef __cplusplus
58}
59#endif /* __cplusplus */
60
61#endif /* S_GNET_MD5_H */