mg_base64_decode.md 585 Bytes
Newer Older
1 2 3 4 5 6 7 8
---
title: "mg_base64_decode()"
decl_name: "mg_base64_decode"
symbol_kind: "func"
signature: |
  int mg_base64_decode(const unsigned char *s, int len, char *dst);
---

9 10 11
Decodes base64-encoded string `s`, `len` into the destination `dst`.
The destination has to have enough space to hold the decoded buffer.
Decoding stops either when all strings have been decoded or invalid an
12 13
character appeared.
Destination is '\0'-terminated.
14 15 16
Returns the number of decoded characters. On success, that should be equal
to `len`. On error (invalid character) the return value is smaller then
`len`. 
17