2 * sha1.h: Converting and comparing SHA1 checksums
\r
4 * ====================================================================
\r
5 * Copyright (c) 2008 CollabNet. All rights reserved.
\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
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
19 #ifndef SVN_LIBSVN_SUBR_SHA1_H
\r
20 #define SVN_LIBSVN_SUBR_SHA1_H
\r
22 #include <apr_pools.h>
\r
23 #include "svn_types.h"
\r
27 #endif /* __cplusplus */
\r
31 /* The SHA1 digest for the empty string. */
\r
32 const unsigned char *
\r
33 svn_sha1__empty_string_digest(void);
\r
36 /* Return the hex representation of DIGEST, which must be
\r
37 * APR_SHA1_DIGESTSIZE bytes long, allocating the string in POOL.
\r
40 svn_sha1__digest_to_cstring_display(const unsigned char digest[],
\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
49 svn_sha1__digest_to_cstring(const unsigned char digest[],
\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
58 svn_sha1__digests_match(const unsigned char d1[],
\r
59 const unsigned char d2[]);
\r
63 #endif /* __cplusplus */
\r
65 #endif /* SVN_LIBSVN_SUBR_SHA1_H */
\r