websDecode64 | GoAhead WebServer API | GoAhead EMF |
Decode a string using the basic encoding scheme (base 64)
#include "webs.h" int websDecode64(char_t *outbuf, char_t *string, int outlen);
outbuf | Output buffer |
string | Input string |
outlen | Output buffer length |
The websDecode64 procedure decodes the string argument into the supplied outbuf buffer. websDecode64 can decode in-situ. Ie. outbuf and string can be the same.
Returns 0 if successful. Returns -1 if the string was not a valid base 64 encoded string.
websEncode64(encoded, "String with special characters \" %", sizeof(encoded)); websDecode64(decoded, encoded, sizeof(decoded));