OSDN Git Service

Success build TortoiseMerge.
[tortoisegit/TortoiseGitJp.git] / src / TortoiseMerge / libsvn_diff / sha1.h
1 /*\r
2  * sha1.h: Converting and comparing SHA1 checksums\r
3  *\r
4  * ====================================================================\r
5  * Copyright (c) 2008 CollabNet.  All rights reserved.\r
6  *\r
7  * This software is licensed as described in the file COPYING, which\r
8  * you should have received as part of this distribution.  The terms\r
9  * are also available at http://subversion.tigris.org/license-1.html.\r
10  * If newer versions of this license are posted there, you may use a\r
11  * newer version instead, at your option.\r
12  *\r
13  * This software consists of voluntary contributions made by many\r
14  * individuals.  For exact contribution history, see the revision\r
15  * history and logs, available at http://subversion.tigris.org/.\r
16  * ====================================================================\r
17  */\r
18 \r
19 #ifndef SVN_LIBSVN_SUBR_SHA1_H\r
20 #define SVN_LIBSVN_SUBR_SHA1_H\r
21 \r
22 #include <apr_pools.h>\r
23 #include "svn_types.h"\r
24 \r
25 #ifdef __cplusplus\r
26 extern "C" {\r
27 #endif /* __cplusplus */\r
28 \r
29 \f\r
30 \r
31 /* The SHA1 digest for the empty string. */\r
32 const unsigned char *\r
33 svn_sha1__empty_string_digest(void);\r
34 \r
35 \r
36 /* Return the hex representation of DIGEST, which must be\r
37  * APR_SHA1_DIGESTSIZE bytes long, allocating the string in POOL.\r
38  */\r
39 const char *\r
40 svn_sha1__digest_to_cstring_display(const unsigned char digest[],\r
41                                     apr_pool_t *pool);\r
42 \r
43 \r
44 /* Return the hex representation of DIGEST, which must be\r
45  * APR_SHA1_DIGESTSIZE bytes long, allocating the string in POOL.\r
46  * If DIGEST is all zeros, then return NULL.\r
47  */\r
48 const char *\r
49 svn_sha1__digest_to_cstring(const unsigned char digest[],\r
50                             apr_pool_t *pool);\r
51 \r
52 \r
53 /** Compare digests D1 and D2, each APR_SHA1_DIGESTSIZE bytes long.\r
54  * If neither is all zeros, and they do not match, then return FALSE;\r
55  * else return TRUE.\r
56  */\r
57 svn_boolean_t\r
58 svn_sha1__digests_match(const unsigned char d1[],\r
59                         const unsigned char d2[]);\r
60 \r
61 #ifdef __cplusplus\r
62 }\r
63 #endif /* __cplusplus */\r
64 \r
65 #endif /* SVN_LIBSVN_SUBR_SHA1_H */\r