summaryrefslogtreecommitdiff
path: root/include/nsutils/base64.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/nsutils/base64.h')
-rw-r--r--include/nsutils/base64.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/nsutils/base64.h b/include/nsutils/base64.h
new file mode 100644
index 0000000..139a1b6
--- /dev/null
+++ b/include/nsutils/base64.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2014 Vincent Sanders <vince@netsurf-browser.org>
+ *
+ * This file is part of libnsutils.
+ *
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ */
+
+/**
+ * \file
+ * Base64 encoding and decoding interface.
+ */
+
+#ifndef NSUTILS_BASE64_H_
+#define NSUTILS_BASE64_H_
+
+#include <nsutils/errors.h>
+
+nserror base64_encode_alloc(const uint8_t *input,
+ size_t input_length,
+ uint8_t **output,
+ size_t *output_length);
+
+nserror base64_decode_alloc(const uint8_t *input,
+ size_t input_length,
+ uint8_t **output,
+ size_t *output_length);
+
+#endif