xref: /freebsd/crypto/openssh/openbsd-compat/base64.h (revision ca86bcf2531c7b149c95244a67853d44323e7855)
1d95e11bfSDag-Erling Smørgrav /*
2d95e11bfSDag-Erling Smørgrav  * Copyright (c) 1996 by Internet Software Consortium.
3d95e11bfSDag-Erling Smørgrav  *
4d95e11bfSDag-Erling Smørgrav  * Permission to use, copy, modify, and distribute this software for any
5d95e11bfSDag-Erling Smørgrav  * purpose with or without fee is hereby granted, provided that the above
6d95e11bfSDag-Erling Smørgrav  * copyright notice and this permission notice appear in all copies.
7d95e11bfSDag-Erling Smørgrav  *
8d95e11bfSDag-Erling Smørgrav  * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
9d95e11bfSDag-Erling Smørgrav  * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
10d95e11bfSDag-Erling Smørgrav  * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
11d95e11bfSDag-Erling Smørgrav  * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12d95e11bfSDag-Erling Smørgrav  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
13d95e11bfSDag-Erling Smørgrav  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
14d95e11bfSDag-Erling Smørgrav  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
15d95e11bfSDag-Erling Smørgrav  * SOFTWARE.
16d95e11bfSDag-Erling Smørgrav  */
17d95e11bfSDag-Erling Smørgrav 
18d95e11bfSDag-Erling Smørgrav /*
19d95e11bfSDag-Erling Smørgrav  * Portions Copyright (c) 1995 by International Business Machines, Inc.
20d95e11bfSDag-Erling Smørgrav  *
21d95e11bfSDag-Erling Smørgrav  * International Business Machines, Inc. (hereinafter called IBM) grants
22d95e11bfSDag-Erling Smørgrav  * permission under its copyrights to use, copy, modify, and distribute this
23d95e11bfSDag-Erling Smørgrav  * Software with or without fee, provided that the above copyright notice and
24d95e11bfSDag-Erling Smørgrav  * all paragraphs of this notice appear in all copies, and that the name of IBM
25d95e11bfSDag-Erling Smørgrav  * not be used in connection with the marketing of any product incorporating
26d95e11bfSDag-Erling Smørgrav  * the Software or modifications thereof, without specific, written prior
27d95e11bfSDag-Erling Smørgrav  * permission.
28d95e11bfSDag-Erling Smørgrav  *
29d95e11bfSDag-Erling Smørgrav  * To the extent it has a right to do so, IBM grants an immunity from suit
30d95e11bfSDag-Erling Smørgrav  * under its patents, if any, for the use, sale or manufacture of products to
31d95e11bfSDag-Erling Smørgrav  * the extent that such products are used for performing Domain Name System
32d95e11bfSDag-Erling Smørgrav  * dynamic updates in TCP/IP networks by means of the Software.  No immunity is
33d95e11bfSDag-Erling Smørgrav  * granted for any product per se or for any other function of any product.
34d95e11bfSDag-Erling Smørgrav  *
35d95e11bfSDag-Erling Smørgrav  * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
36d95e11bfSDag-Erling Smørgrav  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
37d95e11bfSDag-Erling Smørgrav  * PARTICULAR PURPOSE.  IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
38d95e11bfSDag-Erling Smørgrav  * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
39d95e11bfSDag-Erling Smørgrav  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
40d95e11bfSDag-Erling Smørgrav  * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
41d95e11bfSDag-Erling Smørgrav  */
4283d2307dSDag-Erling Smørgrav 
4383d2307dSDag-Erling Smørgrav #ifndef _BSD_BASE64_H
4483d2307dSDag-Erling Smørgrav #define _BSD_BASE64_H
4583d2307dSDag-Erling Smørgrav 
46d95e11bfSDag-Erling Smørgrav #include "includes.h"
4783d2307dSDag-Erling Smørgrav 
4883d2307dSDag-Erling Smørgrav #ifndef HAVE___B64_NTOP
4983d2307dSDag-Erling Smørgrav # ifndef HAVE_B64_NTOP
5083d2307dSDag-Erling Smørgrav int b64_ntop(u_char const *src, size_t srclength, char *target,
5183d2307dSDag-Erling Smørgrav     size_t targsize);
5283d2307dSDag-Erling Smørgrav # endif /* !HAVE_B64_NTOP */
53d95e11bfSDag-Erling Smørgrav # define __b64_ntop(a,b,c,d) b64_ntop(a,b,c,d)
5483d2307dSDag-Erling Smørgrav #endif /* HAVE___B64_NTOP */
5583d2307dSDag-Erling Smørgrav 
56d0c8c0bcSDag-Erling Smørgrav #ifndef HAVE___B64_PTON
57d0c8c0bcSDag-Erling Smørgrav # ifndef HAVE_B64_PTON
58d0c8c0bcSDag-Erling Smørgrav int b64_pton(char const *src, u_char *target, size_t targsize);
59d0c8c0bcSDag-Erling Smørgrav # endif /* !HAVE_B64_PTON */
60d95e11bfSDag-Erling Smørgrav # define __b64_pton(a,b,c) b64_pton(a,b,c)
61d0c8c0bcSDag-Erling Smørgrav #endif /* HAVE___B64_PTON */
62d0c8c0bcSDag-Erling Smørgrav 
6383d2307dSDag-Erling Smørgrav #endif /* _BSD_BASE64_H */
64