base64: implement encode()

This commit is contained in:
Daniel Eklöf 2019-07-19 14:19:42 +02:00
parent fd07f13f2a
commit 9c3ccc182e
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 73 additions and 2 deletions

View file

@ -1,3 +1,8 @@
#pragma once
#include <stdint.h>
#include <stddef.h>
char *base64_decode(const char *s);
char *base64_encode(const uint8_t *data, size_t size);
void base64_encode_final(const uint8_t *data, size_t size, char result[4]);