Revision 74afdc55
libavutil/base64.h | ||
---|---|---|
24 | 24 |
#include <stdint.h> |
25 | 25 |
|
26 | 26 |
/** |
27 |
* Decodes Base64. |
|
28 |
* Parameter order is the same as strncpy(). |
|
27 |
* Decodes the base64-encoded string in \p in and puts the decoded |
|
28 |
* data in \p out. |
|
29 |
* |
|
30 |
* @param out_size size in bytes of the \p out buffer, it should be at |
|
31 |
* least 3/4 of the length of \p in |
|
32 |
* @return the number of bytes written, or a negative value in case of |
|
33 |
* error |
|
29 | 34 |
*/ |
30 | 35 |
int av_base64_decode(uint8_t *out, const char *in, int out_size); |
31 | 36 |
|
32 | 37 |
/** |
33 |
* Encodes Base64. |
|
34 |
* @param src data, not a string |
|
35 |
* @param buf output string |
|
38 |
* Encodes in base64 the data in \p in and puts the resulting string |
|
39 |
* in \p out. |
|
40 |
* |
|
41 |
* @param out_size size in bytes of the \p out string, it should be at |
|
42 |
* least ((\p in_size + 2) / 3) * 4 + 1 |
|
43 |
* @param in_size size in bytes of the \p in buffer |
|
44 |
* @return the string containing the encoded data, or NULL in case of |
|
45 |
* error |
|
36 | 46 |
*/ |
37 | 47 |
char *av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size); |
38 | 48 |
|
Also available in: Unified diff