2016-05-12 04:36:12 +08:00
|
|
|
---
|
|
|
|
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);
|
|
|
|
---
|
|
|
|
|
2016-07-26 00:28:34 +08:00
|
|
|
Decode base64-encoded string `s`, `len` into the destination `dst`.
|
|
|
|
Destination has to have enough space to hold decoded buffer.
|
|
|
|
Decoding stops either when all string has been decoded, or invalid
|
2016-05-12 04:36:12 +08:00
|
|
|
character appeared.
|
|
|
|
Destination is '\0'-terminated.
|
2016-07-26 00:28:34 +08:00
|
|
|
Return number of decoded characters. On success, that should be equal to
|
2016-05-12 04:36:12 +08:00
|
|
|
`len`. On error (invalid character) the return value is smaller then `len`.
|
|
|
|
|