moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kstars / kstars / indi / base64.h
blobd99e474f5ffefeb8a112bd57795323d0b5d00893
1 #ifndef BASE64_H
2 #define BASE64_H
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
8 /**
9 * \defgroup base64 Functions to convert from and to base64
11 /*@{*/
13 /** \brief Convert bytes array to base64.
14 \param out output buffer in base64. The buffer size must be at least (4 * inlen / 3 + 4) bytes long.
15 \param in input binary buffer
16 \param inlen number of bytes to convert
17 \return 0 on success, -1 on failure.
19 extern int to64frombits(unsigned char *out, const unsigned char *in,
20 int inlen);
22 /** \brief Convert base64 to bytes array.
23 \param out output buffer in bytes. The buffer size must be at least (3 * size_of_in_buffer / 4) bytes long.
24 \param in input base64 buffer
25 \return 0 on success, -1 on failure.
28 extern int from64tobits(char *out, const char *in);
30 /*@}*/
32 #ifdef __cplusplus
34 #endif
36 #endif