Conditionally compile the SASL code only with botan and database

This commit is contained in:
louiz’
2020-07-29 00:37:24 +02:00
parent e4550d324f
commit 189015afb4
6 changed files with 51 additions and 37 deletions
+2 -5
View File
@@ -2,18 +2,15 @@
#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
}
}
#endif
+4
View File
@@ -2,9 +2,13 @@
#include "biboumi.h"
#ifdef BOTAN_FOUND
#include <string>
namespace base64
{
std::string encode(const std::string& input);
}
#endif