From f371eb538870c82969f8f7344708a899b8b03956 Mon Sep 17 00:00:00 2001 From: Srivardhan Hebbar Date: Fri, 20 Nov 2015 02:45:39 +0100 Subject: [PATCH] eina: example for base64 encoding. Summary: Depends on D3228 Signed-off-by: Srivardhan Hebbar Reviewers: cedric Differential Revision: https://phab.enlightenment.org/D3230 Signed-off-by: Cedric BAIL --- src/examples/eina/eina_str_01.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/examples/eina/eina_str_01.c b/src/examples/eina/eina_str_01.c index fbe2cf0815..ce30ebd9a0 100644 --- a/src/examples/eina/eina_str_01.c +++ b/src/examples/eina/eina_str_01.c @@ -17,6 +17,7 @@ int main(int argc EINA_UNUSED, char **argv EINA_UNUSED) char *time_arr; time_t curr_time; struct tm *info; + char *b64; eina_init(); @@ -68,6 +69,10 @@ int main(int argc EINA_UNUSED, char **argv EINA_UNUSED) printf("Today's Date: %s\n", time_arr); free(time_arr); + b64 = eina_str_base64_encode((unsigned char *)"Enlightenment", 9); + printf("%s\n", b64); + free(b64); + eina_shutdown(); return 0;