kstars
Functions to convert from and to base64
Functions | |
int | from64tobits (char *out, const char *in) |
int | to64frombits (unsigned char *out, const unsigned char *in, int inlen) |
Function Documentation
int from64tobits | ( | char * | out, | |
const char * | in | |||
) |
Convert base64 to bytes array.
- Parameters:
-
out output buffer in bytes. The buffer size must be at least (3 * size_of_in_buffer / 4) bytes long. in input base64 buffer
- Returns:
- 0 on success, -1 on failure.
int to64frombits | ( | unsigned char * | out, | |
const unsigned char * | in, | |||
int | inlen | |||
) |
Convert bytes array to base64.
- Parameters:
-
out output buffer in base64. The buffer size must be at least (4 * inlen / 3 + 4) bytes long. in input binary buffer inlen number of bytes to convert
- Returns:
- 0 on success, -1 on failure.