Implement SASL plain authentication

This commit is contained in:
louiz’
2020-06-15 00:18:51 +02:00
parent 655bc344d4
commit 2e1ddeb654
12 changed files with 235 additions and 25 deletions
+19
View File
@@ -0,0 +1,19 @@
#include <utils/base64.hpp>
#ifdef BOTAN_FOUND
#include <botan/base64.h>
#endif
namespace base64
{
std::string encode(const std::string &input)
{
#ifdef BOTAN_FOUND
return Botan::base64_encode(reinterpret_cast<const uint8_t*>(input.data()), input.size());
#else
#error "base64::encode() not yet implemented without Botan."
#endif
}
}
+10
View File
@@ -0,0 +1,10 @@
#pragma once
#include "biboumi.h"
#include <string>
namespace base64
{
std::string encode(const std::string& input);
}