00001 /**
00002 * @copyright
00003 * ====================================================================
00004 * Copyright (c) 2000-2004 CollabNet. All rights reserved.
00005 *
00006 * This software is licensed as described in the file COPYING, which
00007 * you should have received as part of this distribution. The terms
00008 * are also available at http://subversion.tigris.org/license-1.html.
00009 * If newer versions of this license are posted there, you may use a
00010 * newer version instead, at your option.
00011 *
00012 * This software consists of voluntary contributions made by many
00013 * individuals. For exact contribution history, see the revision
00014 * history and logs, available at http://subversion.tigris.org/.
00015 * ====================================================================
00016 * @endcopyright
00017 *
00018 * @file svn_md5.h
00019 * @brief Code for converting and comparing MD5 checksums.
00020 */
00021
00022 #ifndef SVN_MD5_H
00023 #define SVN_MD5_H
00024
00025 #include <apr_pools.h>
00026 #include <apr_md5.h>
00027 #include "svn_error.h"
00028 #include "svn_pools.h"
00029
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif /* __cplusplus */
00033
00034
00035
00036 /** The MD5 digest for the empty string. */
00037 const unsigned char *svn_md5_empty_string_digest (void);
00038
00039
00040 /** Return the hex representation of @a digest, which must be
00041 * @c APR_MD5_DIGESTSIZE bytes long, allocating the string in @a pool.
00042 * If @a digest is all zeros, then return NULL.
00043 */
00044 const char *svn_md5_digest_to_cstring (const unsigned char digest[],
00045 apr_pool_t *pool);
00046
00047
00048 /** Compare digests @a d1 and @a d2, each @c APR_MD5_DIGESTSIZE bytes long.
00049 * If neither is all zeros, and they do not match, then return false;
00050 * else return true.
00051 */
00052 svn_boolean_t svn_md5_digests_match (unsigned const char d1[],
00053 unsigned const char d2[]);
00054
00055 #ifdef __cplusplus
00056 }
00057 #endif /* __cplusplus */
00058
00059 #endif /* SVN_MD5_H */
1.2.14 written by Dimitri van Heesch,
© 1997-2002