aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/str_util.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-08-25 15:48:37 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-08-25 15:48:37 +0100
commit91e064d0fdbc45f75f3e2e181ee84d8e879ac91c (patch)
treefd14c832351016b1e2f184e320c1854d56eafb60 /src/libutil/str_util.h
parentf5e66d60bce9dad37e7326119d8a94762c397e85 (diff)
downloadrspamd-91e064d0fdbc45f75f3e2e181ee84d8e879ac91c.tar.gz
rspamd-91e064d0fdbc45f75f3e2e181ee84d8e879ac91c.zip
Add folded version of base64 encoding
Diffstat (limited to 'src/libutil/str_util.h')
-rw-r--r--src/libutil/str_util.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libutil/str_util.h b/src/libutil/str_util.h
index e07c51701..f8d9dd4dc 100644
--- a/src/libutil/str_util.h
+++ b/src/libutil/str_util.h
@@ -129,6 +129,16 @@ gchar * rspamd_encode_base64 (const guchar *in, gsize inlen, gint str_len,
gsize *outlen);
/**
+ * Encode and fold string using base64 encoding
+ * @param in input
+ * @param inlen input length
+ * @param str_len maximum string length (if <= 0 then no lines are split)
+ * @return freshly allocated base64 encoded value or NULL if input is invalid
+ */
+gchar * rspamd_encode_base64_fold (const guchar *in, gsize inlen, gint str_len,
+ gsize *outlen);
+
+/**
* Decode URL encoded string in-place and return new length of a string, src and dst are NULL terminated
* @param dst
* @param src