Subversion
svn_md5.h
Go to the documentation of this file.
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
35extern "C" {
36#endif /* __cplusplus */
37
38
39
40/**
41 * The MD5 digest for the empty string.
42 *
43 * @deprecated Provided for backward compatibility with the 1.5 API.
44 * */
46const unsigned char *
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 */
57const char *
58svn_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 */
70const char *
71svn_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 */
84svn_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 */
const unsigned char * svn_md5_empty_string_digest(void)
The MD5 digest for the empty string.
svn_boolean_t svn_md5_digests_match(const unsigned char d1[], const unsigned char d2[])
Compare digests d1 and d2, each APR_MD5_DIGESTSIZE bytes long.
const char * svn_md5_digest_to_cstring(const unsigned char digest[], apr_pool_t *pool)
Return the hex representation of digest, which must be APR_MD5_DIGESTSIZE bytes long,...
const char * svn_md5_digest_to_cstring_display(const unsigned char digest[], apr_pool_t *pool)
Return the hex representation of digest, which must be APR_MD5_DIGESTSIZE bytes long,...
Subversion's data types.
int svn_boolean_t
YABT: Yet Another Boolean Type.
Definition: svn_types.h:141
#define SVN_DEPRECATED
Macro used to mark deprecated functions.
Definition: svn_types.h:62