You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

25 lines
477 B

=proto
void duk_base64_decode(duk_context *ctx, int index);
=stack
[ ... base64_val! ... ] -> [ ... val! ... ]
=summary
<p>Decodes a base-64 encoded value into a buffer as an in-place operation.
If the input is invalid, throws an error.</p>
=example
duk_push_string(ctx, "Zm9v");
duk_base64_decode(ctx, -1); /* buffer */
printf("base-64 decoded: %s\n", duk_to_string(ctx, -1));
duk_pop(ctx);
/* Output:
* base-64 decoded: foo
*/
=tags
codec
=seealso
duk_base64_encode