diff options
Diffstat (limited to 'src/utils/base64.cpp')
-rw-r--r-- | src/utils/base64.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/utils/base64.cpp b/src/utils/base64.cpp new file mode 100644 index 0000000..c0959bb --- /dev/null +++ b/src/utils/base64.cpp @@ -0,0 +1,16 @@ +#include <utils/base64.hpp> + +#ifdef BOTAN_FOUND +#include <botan/base64.h> + +namespace base64 +{ + +std::string encode(const std::string &input) +{ + return Botan::base64_encode(reinterpret_cast<const uint8_t*>(input.data()), input.size()); +} + +} + +#endif |