Virgil IoT KIT
|
base64 functions More...
#include <stdbool.h>
Go to the source code of this file.
Functions | |
int | base64decode_len (const char *in, int inlen) |
Get Base64 Decoded len. More... | |
bool | base64decode (const char *in, int inlen, unsigned char *out, int *outlen) |
Base64 Decode string. More... | |
int | base64encode_len (int len) |
Get Base64 Encoded len. More... | |
bool | base64encode (const unsigned char *in, int inlen, char *out, int *outlen) |
Base64 Encode data. More... | |
base64 functions
This header contains base64 encoders/decoders.
You can see an example :
This product includes software developed by the Apache Group for use in the Apache HTTP server project (http://www.apache.org/)
bool base64decode | ( | const char * | in, |
int | inlen, | ||
unsigned char * | out, | ||
int * | outlen | ||
) |
Base64 Decode string.
This function decodes the given Base64 encoded string into raw binary data.
[in] | in | Pointer to Base64 encoded string. |
[in] | inlen | Length of the Base64 encoded string. |
[out] | out | Pointer to the output buffer that will be populated by the function. |
[in,out] | outlen | Holds the length of the output buffer and is populated with the length of the decoded data by this function. |
int base64decode_len | ( | const char * | in, |
int | inlen | ||
) |
Get Base64 Decoded len.
Gives the length of the data that will be obtained after decoding the given base64 encoded string
[in] | in | Pointer to Base64 encoded string. |
[in] | inlen | Length of the Base64 encoded string. |
bool base64encode | ( | const unsigned char * | in, |
int | inlen, | ||
char * | out, | ||
int * | outlen | ||
) |
Base64 Encode data.
This function encodes the given raw binary data into a Base64 encoded string.
[in] | in | Pointer to raw binary data |
[in] | inlen | Length if the binary data (in bytes) |
[out] | out | Pointer to the output buffer that will be populated by the function |
[in/out] | outlen Holds the length of the output buffer and is populated with the length of the encoded data by this function. The required length of the buffer can be obtained using base64encode_len(). |
int base64encode_len | ( | int | len | ) |
Get Base64 Encoded len.
Gives the length of the string that will be obtained after encoding the given binary data
[in] | Length | of the input binary data. |