From 297a44c08675f4b7744081963248e9e3552850e7 Mon Sep 17 00:00:00 2001 From: Onur Gündüz Date: Tue, 16 Jun 2026 18:02:57 +0200 Subject: server: extract server_util, sbuf, and base64 leaf utilities --- src/base64.h | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/base64.h (limited to 'src/base64.h') 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 + +/* 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 */ -- cgit v1.3.1