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"
28 #endif /* __cplusplus */
32 /* The MD5 digest for the empty string. */
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.
41 svn_md5__digest_to_cstring_display(const unsigned char digest
[],
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.
50 svn_md5__digest_to_cstring(const unsigned char digest
[],
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;
59 svn_md5__digests_match(const unsigned char d1
[],
60 const unsigned char d2
[]);
64 #endif /* __cplusplus */
66 #endif /* SVN_LIBSVN_SUBR_MD5_H */