aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-06-15 17:48:09 +0100
committerMark Haines <mark.haines@matrix.org>2015-06-15 17:48:09 +0100
commit7cdde735604de3d1be54fc535df3985b89eebd0a (patch)
treefdea841c191ede16f3eb50074879d9161cec6b64 /include
parent026e4394bb333e978a37f5821f0a1c3dca6acb1d (diff)
Add base64 encoders and decoders
Diffstat (limited to 'include')
-rw-r--r--include/axolotl/base64.hh35
1 files changed, 35 insertions, 0 deletions
diff --git a/include/axolotl/base64.hh b/include/axolotl/base64.hh
new file mode 100644
index 0000000..c322640
--- /dev/null
+++ b/include/axolotl/base64.hh
@@ -0,0 +1,35 @@
+#ifndef AXOLOLT_BASE64_HH_
+#define AXOLOLT_BASE64_HH_
+
+#include <cstddef>
+#include <cstdint>
+
+namespace axolotl {
+
+
+std::size_t encode_base64_length(
+ std::size_t input_length
+);
+
+
+void encode_base64(
+ std::uint8_t const * input, std::size_t input_length,
+ std::uint8_t * output
+);
+
+
+std::size_t decode_base64_length(
+ std::size_t input_length
+);
+
+
+void decode_base64(
+ std::uint8_t const * input, std::size_t input_length,
+ std::uint8_t * output
+);
+
+
+} // namespace axolotl
+
+
+#endif /* AXOLOLT_BASE64_HH_ */