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 * ====================================================================
19 * @brief Base64 encoding and decoding functions
31 #endif /* __cplusplus */
36 * @defgroup base64 Base64 encoding/decoding functions
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
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
,
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
,
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
[],
81 /** @} end group: Base64 encoding/decoding functions */
85 #endif /* __cplusplus */
87 #endif /* SVN_BASE64_H */