~singpolyma/biboumi

ref: 2e1ddeb6547e140e9651231fedcd00e8ee4b1ccd biboumi/src/utils/base64.cpp -rw-r--r-- 340 bytes
2e1ddeb6 — louiz’ Implement SASL plain authentication 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
}

}