]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/subversion/subversion/include/svn_md5.h
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / subversion / subversion / include / svn_md5.h
1 /**
2  * @copyright
3  * ====================================================================
4  *    Licensed to the Apache Software Foundation (ASF) under one
5  *    or more contributor license agreements.  See the NOTICE file
6  *    distributed with this work for additional information
7  *    regarding copyright ownership.  The ASF licenses this file
8  *    to you under the Apache License, Version 2.0 (the
9  *    "License"); you may not use this file except in compliance
10  *    with the License.  You may obtain a copy of the License at
11  *
12  *      http://www.apache.org/licenses/LICENSE-2.0
13  *
14  *    Unless required by applicable law or agreed to in writing,
15  *    software distributed under the License is distributed on an
16  *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17  *    KIND, either express or implied.  See the License for the
18  *    specific language governing permissions and limitations
19  *    under the License.
20  * ====================================================================
21  * @endcopyright
22  *
23  * @file svn_md5.h
24  * @brief Converting and comparing MD5 checksums.
25  */
26
27 #ifndef SVN_MD5_H
28 #define SVN_MD5_H
29
30 #include <apr_pools.h>  /* for apr_pool_t */
31
32 #include "svn_types.h"  /* for svn_boolean_t */
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif /* __cplusplus */
37
38 \f
39
40 /**
41  * The MD5 digest for the empty string.
42  *
43  * @deprecated Provided for backward compatibility with the 1.5 API.
44  * */
45 SVN_DEPRECATED
46 const unsigned char *
47 svn_md5_empty_string_digest(void);
48
49
50 /**
51  * Return the hex representation of @a digest, which must be
52  * @c APR_MD5_DIGESTSIZE bytes long, allocating the string in @a pool.
53  *
54  * @deprecated Provided for backward compatibility with the 1.5 API.
55  */
56 SVN_DEPRECATED
57 const char *
58 svn_md5_digest_to_cstring_display(const unsigned char digest[],
59                                   apr_pool_t *pool);
60
61
62 /**
63  * Return the hex representation of @a digest, which must be
64  * @c APR_MD5_DIGESTSIZE bytes long, allocating the string in @a pool.
65  * If @a digest is all zeros, then return NULL.
66  *
67  * @deprecated Provided for backward compatibility with the 1.5 API.
68  */
69 SVN_DEPRECATED
70 const char *
71 svn_md5_digest_to_cstring(const unsigned char digest[],
72                           apr_pool_t *pool);
73
74
75 /**
76  * Compare digests @a d1 and @a d2, each @c APR_MD5_DIGESTSIZE bytes long.
77  * If neither is all zeros, and they do not match, then return FALSE;
78  * else return TRUE.
79  *
80  * @deprecated Provided for backward compatibility with the 1.5 API.
81  */
82 SVN_DEPRECATED
83 svn_boolean_t
84 svn_md5_digests_match(const unsigned char d1[],
85                       const unsigned char d2[]);
86
87 #ifdef __cplusplus
88 }
89 #endif /* __cplusplus */
90
91 #endif /* SVN_MD5_H */