Fix compiler warning due to missing function prototype.
[svn.git] / subversion / include / svn_base64.h
blob679addcb84c36ad61b0ef2ed94c913d0426fa000
1 /**
2 * @copyright
3 * ====================================================================
4 * Copyright (c) 2000-2004 CollabNet. All rights reserved.
6 * This software is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution. The terms
8 * are also available at http://subversion.tigris.org/license-1.html.
9 * If newer versions of this license are posted there, you may use a
10 * newer version instead, at your option.
12 * This software consists of voluntary contributions made by many
13 * individuals. For exact contribution history, see the revision
14 * history and logs, available at http://subversion.tigris.org/.
15 * ====================================================================
16 * @endcopyright
18 * @file svn_base64.h
19 * @brief Base64 encoding and decoding functions
22 #ifndef SVN_BASE64_H
23 #define SVN_BASE64_H
25 #include <apr_md5.h>
27 #include "svn_io.h"
29 #ifdef __cplusplus
30 extern "C" {
31 #endif /* __cplusplus */
33 /**
36 * @defgroup base64 Base64 encoding/decoding functions
38 * @{
41 /** Return a writable generic stream which will encode binary data in
42 * base64 format and write the encoded data to @c output. Be sure to
43 * close the stream when done writing in order to squeeze out the last
44 * bit of encoded data. The stream is allocated in @c pool.
46 svn_stream_t *svn_base64_encode(svn_stream_t *output, apr_pool_t *pool);
48 /** Return a writable generic stream which will decode base64-encoded
49 * data and write the decoded data to @c output. The stream is allocated
50 * in @c pool.
52 svn_stream_t *svn_base64_decode(svn_stream_t *output, apr_pool_t *pool);
55 /** Encode an @c svn_stringbuf_t into base64.
57 * A simple interface for encoding base64 data assuming we have all of
58 * it present at once. The returned string will be allocated from @c pool.
60 const svn_string_t *svn_base64_encode_string(const svn_string_t *str,
61 apr_pool_t *pool);
63 /** Decode an @c svn_stringbuf_t from base64.
65 * A simple interface for decoding base64 data assuming we have all of
66 * it present at once. The returned string will be allocated from @c pool.
68 const svn_string_t *svn_base64_decode_string(const svn_string_t *str,
69 apr_pool_t *pool);
72 /** Return a base64-encoded checksum for finalized @c digest.
74 * @c digest contains @c APR_MD5_DIGESTSIZE bytes of finalized data.
75 * Allocate the returned checksum in @c pool.
77 svn_stringbuf_t *svn_base64_from_md5(unsigned char digest[],
78 apr_pool_t *pool);
81 /** @} end group: Base64 encoding/decoding functions */
83 #ifdef __cplusplus
85 #endif /* __cplusplus */
87 #endif /* SVN_BASE64_H */