summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mnogosearch.org>2013-09-23 18:58:33 +0400
committerAlexander Barkov <bar@mnogosearch.org>2013-09-23 18:58:33 +0400
commite33582d20d2a9f215dc4d0effa55886bbabdce3d (patch)
treeeebea43211dfaefb954c40af5b72afe97019b572 /include
parent9cbd53bfb2e72376080a3951185e4780b0519718 (diff)
downloadmariadb-git-e33582d20d2a9f215dc4d0effa55886bbabdce3d.tar.gz
Merging TO_BASE64() and FROM_BASE64() from MySQL-5.6
Diffstat (limited to 'include')
-rw-r--r--include/base64.h15
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