Instrument Neutral Distributed Interface INDI  1.9.2
Functions
base64.h File Reference
#include <stddef.h>

Go to the source code of this file.

Functions

int to64frombits_s (unsigned char *out, const unsigned char *in, int inlen, size_t outlen)
 Convert bytes array to base64. More...
 
int to64frombits (unsigned char *out, const unsigned char *in, int inlen)
 
int from64tobits (char *out, const char *in)
 Convert base64 to bytes array. More...
 
int from64tobits_fast (char *out, const char *in, int inlen)
 

Function Documentation

◆ from64tobits()

int from64tobits ( char *  out,
const char *  in 
)

Convert base64 to bytes array.

Parameters
outoutput buffer in bytes. The buffer size must be at least (3 * size_of_in_buffer / 4) bytes long.
ininput base64 buffer
inlenbase64 buffer lenght
Returns
0 on success, -1 on failure.

Definition at line 98 of file base64.c.

◆ from64tobits_fast()

int from64tobits_fast ( char *  out,
const char *  in,
int  inlen 
)

Definition at line 106 of file base64.c.

◆ to64frombits()

int to64frombits ( unsigned char *  out,
const unsigned char *  in,
int  inlen 
)

Definition at line 61 of file base64.c.

◆ to64frombits_s()

int to64frombits_s ( unsigned char *  out,
const unsigned char *  in,
int  inlen,
size_t  outlen 
)

Convert bytes array to base64.

Parameters
outoutput buffer in base64. The buffer size must be at least (4 * inlen / 3 + 4) bytes long.
ininput binary buffer
inlennumber of bytes to convert
Returns
0 on success, -1 on failure.

Definition at line 47 of file base64.c.