Sync libsvn_diff from subversion r876937
[TortoiseGit.git] / src / TortoiseMerge / libsvn_diff / md5.h
blob7fb324233151ac4e9b9d40f1d6269e220c05d193
1 /*
2 * md5.h: Converting and comparing MD5 checksums
4 * ====================================================================
5 * Copyright (c) 2008 CollabNet. All rights reserved.
7 * This software is licensed as described in the file COPYING, which
8 * you should have received as part of this distribution. The terms
9 * are also available at http://subversion.tigris.org/license-1.html.
10 * If newer versions of this license are posted there, you may use a
11 * newer version instead, at your option.
13 * This software consists of voluntary contributions made by many
14 * individuals. For exact contribution history, see the revision
15 * history and logs, available at http://subversion.tigris.org/.
16 * ====================================================================
19 #ifndef SVN_LIBSVN_SUBR_MD5_H
20 #define SVN_LIBSVN_SUBR_MD5_H
22 #include <apr_pools.h>
24 #include "svn_types.h"
26 #ifdef __cplusplus
27 extern "C" {
28 #endif /* __cplusplus */
32 /* The MD5 digest for the empty string. */
33 const unsigned char *
34 svn_md5__empty_string_digest(void);
37 /* Return the hex representation of DIGEST, which must be
38 * APR_MD5_DIGESTSIZE bytes long, allocating the string in POOL.
40 const char *
41 svn_md5__digest_to_cstring_display(const unsigned char digest[],
42 apr_pool_t *pool);
45 /* Return the hex representation of DIGEST, which must be
46 * APR_MD5_DIGESTSIZE bytes long, allocating the string in POOL.
47 * If DIGEST is all zeros, then return NULL.
49 const char *
50 svn_md5__digest_to_cstring(const unsigned char digest[],
51 apr_pool_t *pool);
54 /** Compare digests D1 and D2, each APR_MD5_DIGESTSIZE bytes long.
55 * If neither is all zeros, and they do not match, then return FALSE;
56 * else return TRUE.
58 svn_boolean_t
59 svn_md5__digests_match(const unsigned char d1[],
60 const unsigned char d2[]);
62 #ifdef __cplusplus
64 #endif /* __cplusplus */
66 #endif /* SVN_LIBSVN_SUBR_MD5_H */