Revision ffd31cfe

View differences:

libavutil/base64.h
24 24
#include <stdint.h>
25 25

  
26 26
/**
27
 * Decode the base64-encoded string in in and put the decoded
28
 * data in out.
27
 * Decode a base64-encoded string.
29 28
 *
30
 * @param out_size size in bytes of the out buffer, it should be at
31
 * least 3/4 of the length of in
32
 * @return the number of bytes written, or a negative value in case of
33
 * error
29
 * @param out      buffer for decoded data
30
 * @param in       null-terminated input string
31
 * @param out_size size in bytes of the out buffer, must be at
32
 *                 least 3/4 of the length of in
33
 * @return         number of bytes written, or a negative value in case of
34
 *                 invalid input
34 35
 */
35 36
int av_base64_decode(uint8_t *out, const char *in, int out_size);
36 37

  
37 38
/**
38
 * Encode in base64 the data in in and put the resulting string
39
 * in out.
39
 * Encode data to base64 and null-terminate.
40 40
 *
41
 * @param out_size size in bytes of the out string, it should be at
42
 * least ((in_size + 2) / 3) * 4 + 1
43
 * @param in_size size in bytes of the in buffer
44
 * @return the string containing the encoded data, or NULL in case of
45
 * error
41
 * @param out      buffer for encoded data
42
 * @param out_size size in bytes of the output buffer, must be at
43
 *                 least AV_BASE64_SIZE(in_size)
44
 * @param in_size  size in bytes of the 'in' buffer
45
 * @return         'out' or NULL in case of error
46 46
 */
47 47
char *av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size);
48 48

  

Also available in: Unified diff