Instrument Neutral Distributed Interface INDI  2.0.2
base64.h
Go to the documentation of this file.
1 #if 0
2 INDI
3 Copyright (C) 2003 Elwood C. Downey
4 
5 This library is free software;
6 you can redistribute it and / or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation;
9 either
10 version 2.1 of the License, or (at your option) any later version.
11 
12 This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY;
14 without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17 
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library;
20 if not, write to the Free Software
21 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110 - 1301 USA
22 
23 #endif
24 
25 #pragma once
26 
27 #include <stddef.h>
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
37 
44 extern int to64frombits_s(unsigned char *out, const unsigned char *in, int inlen, size_t outlen);
45 
46 #if defined(__GNUC__)
47 __attribute__((deprecated("unsafe function, use to64frombits_s instead")))
48 #endif
49 extern int to64frombits(unsigned char *out, const unsigned char *in, int inlen);
50 
58 extern int from64tobits(char *out, const char *in);
59 extern int from64tobits_fast(char *out, const char *in, int inlen);
60 extern int from64tobits_fast_with_bug(char *out, const char *in, int inlen);
61 
64 #ifdef __cplusplus
65 }
66 #endif
int from64tobits(char *out, const char *in)
Convert base64 to bytes array.
Definition: base64.c:114
int to64frombits_s(unsigned char *out, const unsigned char *in, int inlen, size_t outlen)
Convert bytes array to base64.
Definition: base64.c:63
int to64frombits(unsigned char *out, const unsigned char *in, int inlen)
Definition: base64.c:77
int from64tobits_fast_with_bug(char *out, const char *in, int inlen)
Definition: base64.c:199
int from64tobits_fast(char *out, const char *in, int inlen)
Definition: base64.c:122
__attribute__((__format__(__printf__, 2, 0))) void CelestronDriver
Namespace to encapsulate INDI client, drivers, and mediator classes.