summary refs log tree commit diff
path: root/chat.h
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-12-03 23:05:01 -0500
committerJune McEnroe <june@causal.agency>2018-12-03 23:05:01 -0500
commita8c30b898c2e4dec02c75a25e72c211d9dba473d (patch)
tree955596669c860d0843e054c0313a0419e1169431 /chat.h
parentCall uiShow at init so that TermFocus gets set (diff)
downloadcatgirl-a8c30b898c2e4dec02c75a25e72c211d9dba473d.tar.gz
catgirl-a8c30b898c2e4dec02c75a25e72c211d9dba473d.zip
Implement base64 encoding
Will be used for SASL authentication.
Diffstat (limited to 'chat.h')
-rw-r--r--chat.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/chat.h b/chat.h
index b6411d7..6c1cf0f 100644
--- a/chat.h
+++ b/chat.h
@@ -30,6 +30,8 @@
 #define err(...) do { uiHide(); err(__VA_ARGS__); } while (0)
 #define errx(...) do { uiHide(); errx(__VA_ARGS__); } while (0)
 
+typedef unsigned char byte;
+
 struct {
 	char *host;
 	char *port;
@@ -193,6 +195,7 @@ char *awcstombs(const wchar_t *src);
 char *awcsntombs(const wchar_t *src, size_t nwc);
 int vaswprintf(wchar_t **ret, const wchar_t *format, va_list ap);
 int aswprintf(wchar_t **ret, const wchar_t *format, ...);
+char *base64(const byte *src, size_t len);
 
 // HACK: clang won't check wchar_t *format strings.
 #ifdef NDEBUG