Provide (experimental) clang-format file
[TortoiseGit.git] / src / TortoiseMerge / libsvn_diff / md5.h
blob273b5031b091802298ab3becd649f4c676dd532c
1 /*
2 * md5.h: Converting and comparing MD5 checksums
4 * ====================================================================
5 * Licensed to the Apache Software Foundation (ASF) under one
6 * or more contributor license agreements. See the NOTICE file
7 * distributed with this work for additional information
8 * regarding copyright ownership. The ASF licenses this file
9 * to you under the Apache License, Version 2.0 (the
10 * "License"); you may not use this file except in compliance
11 * with the License. You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing,
16 * software distributed under the License is distributed on an
17 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18 * KIND, either express or implied. See the License for the
19 * specific language governing permissions and limitations
20 * under the License.
21 * ====================================================================
24 #ifndef SVN_LIBSVN_SUBR_MD5_H
25 #define SVN_LIBSVN_SUBR_MD5_H
27 #include <apr_pools.h>
29 #include "svn_types.h"
31 #ifdef __cplusplus
32 extern "C" {
33 #endif /* __cplusplus */
37 /* The MD5 digest for the empty string. */
38 const unsigned char *
39 svn_md5__empty_string_digest(void);
42 /* Return the hex representation of DIGEST, which must be
43 * APR_MD5_DIGESTSIZE bytes long, allocating the string in POOL.
45 const char *
46 svn_md5__digest_to_cstring_display(const unsigned char digest[],
47 apr_pool_t *pool);
50 /* Return the hex representation of DIGEST, which must be
51 * APR_MD5_DIGESTSIZE bytes long, allocating the string in POOL.
52 * If DIGEST is all zeros, then return NULL.
54 const char *
55 svn_md5__digest_to_cstring(const unsigned char digest[],
56 apr_pool_t *pool);
59 /** Compare digests D1 and D2, each APR_MD5_DIGESTSIZE bytes long.
60 * If neither is all zeros, and they do not match, then return FALSE;
61 * else return TRUE.
63 svn_boolean_t
64 svn_md5__digests_match(const unsigned char d1[],
65 const unsigned char d2[]);
67 #ifdef __cplusplus
69 #endif /* __cplusplus */
71 #endif /* SVN_LIBSVN_SUBR_MD5_H */