summaryrefslogtreecommitdiff
path: root/src/lib/emile/emile_base64.h
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2016-01-07 15:53:12 -0800
committerCedric BAIL <cedric@osg.samsung.com>2016-01-07 16:27:57 -0800
commitbb921aff04b5497d9339e73625c07a26511cdf3b (patch)
tree99ff80fab28d6073a4ef2c4c987ec801c65da851 /src/lib/emile/emile_base64.h
parentc451d5885bbf5d936c52c26731e044da7cd43075 (diff)
emile: move all eina_str_base64 to emile_base64.
Diffstat (limited to 'src/lib/emile/emile_base64.h')
-rw-r--r--src/lib/emile/emile_base64.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/lib/emile/emile_base64.h b/src/lib/emile/emile_base64.h
new file mode 100644
index 0000000000..7e677458a2
--- /dev/null
+++ b/src/lib/emile/emile_base64.h
@@ -0,0 +1,65 @@
1#ifndef EMILE_BASE64_H_
2#define EMILE_BASE64_H_
3
4/**
5 * @defgroup Emile_Group_Base64 Non destructive base64 manipulation functions.
6 * @ingroup Emile
7 * Function that allow the encoding and decoding of base64 Eina_Binbuf.
8 *
9 * @{
10 */
11
12/**
13 * @brief base64 encoding function.
14 * @param in The buffer to be encoded.
15 * @return the base64 encoded string.
16 *
17 * This will create a string which is base64 encode of the buffer. The caller has
18 * to free the returned string using eina_strbuf_free().
19 *
20 * @since 1.17.0
21 */
22EAPI Eina_Strbuf *emile_base64_encode(const Eina_Binbuf *in);
23
24/**
25 * @brief base64 url and filename safe encoding function.
26 * @param src The buffer to be encoded.
27 * @return the base64 url encoded string.
28 *
29 * This will create a string which is base64 encoded with url and
30 * filename safe alphabet of the src. The caller has to free the
31 * returned string using eina_strbuf_free(). There will be no padding in the
32 * encoded string.
33 *
34 * @since 1.17.0
35 */
36EAPI Eina_Strbuf *emile_base64url_encode(const Eina_Binbuf *in);
37
38/**
39 * @brief base64 decoding function.
40 * @param src The string to be decoded.
41 * @return the base64 decoded buffer.
42 *
43 * This will create a buffer which is base64 decode of the src.
44 * The caller has to free the returned string using eina_binbuf_free().
45 *
46 * @since 1.17.0
47 */
48EAPI Eina_Binbuf* emile_base64_decode(const Eina_Strbuf *in);
49
50/**
51 * @brief decoding function for base64 url and filename safe encoding.
52 * @param src The string to be decoded.
53 * @return the base64 url decoded buffer.
54 *
55 * This will create a buffer which is base64 url decode of the src.
56 * The caller has to free the returned string using eina_binbuf_free().
57 *
58 * @since 1.17.0
59 */
60EAPI Eina_Binbuf* emile_base64url_decode(const Eina_Strbuf *in);
61
62/**
63 * @}
64 */
65#endif