diff options
author | Alexander Barkov <bar@mnogosearch.org> | 2013-09-23 18:58:33 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mnogosearch.org> | 2013-09-23 18:58:33 +0400 |
commit | e33582d20d2a9f215dc4d0effa55886bbabdce3d (patch) | |
tree | eebea43211dfaefb954c40af5b72afe97019b572 /include | |
parent | 9cbd53bfb2e72376080a3951185e4780b0519718 (diff) | |
download | mariadb-git-e33582d20d2a9f215dc4d0effa55886bbabdce3d.tar.gz |
Merging TO_BASE64() and FROM_BASE64() from MySQL-5.6
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 |