3 * ====================================================================
4 * Copyright (c) 2000-2004, 2008 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
25 #include <apr_pools.h>
27 #include "svn_types.h"
28 #include "svn_io.h" /* for svn_stream_t */
29 #include "svn_string.h"
33 #endif /* __cplusplus */
38 * @defgroup base64 Base64 encoding/decoding functions
43 /** Return a writable generic stream which will encode binary data in
44 * base64 format and write the encoded data to @c output. Be sure to
45 * close the stream when done writing in order to squeeze out the last
46 * bit of encoded data. The stream is allocated in @c pool.
49 svn_base64_encode(svn_stream_t
*output
,
52 /** Return a writable generic stream which will decode base64-encoded
53 * data and write the decoded data to @c output. The stream is allocated
57 svn_base64_decode(svn_stream_t
*output
,
61 /** Encode an @c svn_stringbuf_t into base64.
63 * A simple interface for encoding base64 data assuming we have all of
64 * it present at once. If @a break_lines is true, newlines will be
65 * inserted periodically; otherwise the string will only consist of
66 * base64 encoding characters. The returned string will be allocated
72 svn_base64_encode_string2(const svn_string_t
*str
,
73 svn_boolean_t break_lines
,
77 * Same as svn_base64_encode_string2, but with @a break_lines always
80 * @deprecated Provided for backward compatibility with the 1.5 API.
84 svn_base64_encode_string(const svn_string_t
*str
,
87 /** Decode an @c svn_stringbuf_t from base64.
89 * A simple interface for decoding base64 data assuming we have all of
90 * it present at once. The returned string will be allocated from @c
95 svn_base64_decode_string(const svn_string_t
*str
,
99 /** Return a base64-encoded checksum for finalized @c digest.
101 * @c digest contains @c APR_MD5_DIGESTSIZE bytes of finalized data.
102 * Allocate the returned checksum in @c pool.
104 * @deprecated Provided for backward compatibility with the 1.5 API.
108 svn_base64_from_md5(unsigned char digest
[],
112 /** @} end group: Base64 encoding/decoding functions */
116 #endif /* __cplusplus */
118 #endif /* SVN_BASE64_H */