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