diff options
| author | Onur Gündüz <ogunduz@gmail.com> | 2026-06-16 18:02:57 +0200 |
|---|---|---|
| committer | Onur Gündüz <ogunduz@gmail.com> | 2026-06-16 18:02:57 +0200 |
| commit | 297a44c08675f4b7744081963248e9e3552850e7 (patch) | |
| tree | 4badae72f48b67dd0299461aecea9961b355b0e6 /src/base64.h | |
| parent | 230dc1748aa68cccde6de9aa3cdade7d64aede56 (diff) | |
| download | ffwd-297a44c08675f4b7744081963248e9e3552850e7.tar.gz ffwd-297a44c08675f4b7744081963248e9e3552850e7.zip | |
server: extract server_util, sbuf, and base64 leaf utilities
Diffstat (limited to 'src/base64.h')
| -rw-r--r-- | src/base64.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/base64.h b/src/base64.h new file mode 100644 index 0000000..17e2036 --- /dev/null +++ b/src/base64.h @@ -0,0 +1,10 @@ +#ifndef EMBED_BASE64_H +#define EMBED_BASE64_H + +#include <stddef.h> + +/* Standard base64 (with '=' padding) of n bytes. Returns a NUL-terminated heap + * string the caller frees; die-on-OOM, so it never returns NULL. */ +char *base64_encode(const unsigned char *src, size_t n); + +#endif /* EMBED_BASE64_H */ |
