Change base64 API

This commit is contained in:
cpq committed 2023-08-22 12:11:13 +01:00
1 parent 30e0f42c97
commit 527e89754e
11 files changed
+124 -91

No files matched your search

+1 -1
View File
@@ -34,7 +34,7 @@ static void fn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
} else if (*state == AUTH) {
char a[100], b[300] = "";
size_t n = mg_snprintf(a, sizeof(a), "%c%s%c%s", 0, user, 0, pass);
mg_base64_encode((uint8_t *) a, n, b);
mg_base64_encode((uint8_t *) a, n, b, sizeof(b));
mg_printf(c, "AUTH PLAIN %s\r\n", b);
*state = FROM;
} else if (*state == FROM) {