eina: update example for with eina_base64url_decode function.
authorSrivardhan Hebbar <sri.hebbar@samsung.com>
Mon, 4 Jan 2016 23:20:48 +0000 (15:20 -0800)
committerCedric BAIL <cedric@osg.samsung.com>
Mon, 4 Jan 2016 23:42:59 +0000 (15:42 -0800)
Summary:
Depends on D3521

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3523

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/examples/eina/eina_str_01.c

index 4cf67a0..ec34ce4 100644 (file)
@@ -80,7 +80,10 @@ int main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
 
    b64 = eina_str_base64url_encode((unsigned char *)"www.enlightenment.org", 21);
    printf("%s\n", b64);
+   decoded = eina_str_base64_decode(b64, &decoded_len);
+   printf("decoded string: %s, decoded_len: %d\n", decoded, decoded_len);
    free(b64);
+   free(decoded);
 
    eina_shutdown();