diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/base64.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/base64.h b/include/base64.h index 1069c286a7a..9a843b5088e 100644 --- a/include/base64.h +++ b/include/base64.h @@ -27,11 +27,21 @@ extern "C" { int base64_needed_encoded_length(int length_of_data); /* + Maximum length base64_encode_needed_length() can accept with no overflow. +*/ +int base64_encode_max_arg_length(void); + +/* Calculate how much memory needed for dst of base64_decode() */ int base64_needed_decoded_length(int length_of_encoded_data); /* + Maximum length base64_decode_needed_length() can accept with no overflow. +*/ +int base64_decode_max_arg_length(); + +/* Encode data as a base64 string */ int base64_encode(const void *src, size_t src_len, char *dst); @@ -40,7 +50,10 @@ int base64_encode(const void *src, size_t src_len, char *dst); Decode a base64 string into data */ int base64_decode(const char *src, size_t src_len, - void *dst, const char **end_ptr); + void *dst, const char **end_ptr, int flags); + +/* Allow multuple chunks 'AAA= AA== AA==', binlog uses this */ +#define MY_BASE64_DECODE_ALLOW_MULTIPLE_CHUNKS 1 #ifdef __cplusplus |