This repository has been archived on 2023-08-12. You can view files and clone it. You cannot open issues or pull requests or push a commit.
2016-10-15 12:37:59 -04:00
|
|
|
#ifndef NNTPCHAN_BASE64_HPP
|
|
|
|
|
#define NNTPCHAN_BASE64_HPP
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
namespace nntpchan
|
|
|
|
|
{
|
2017-10-17 10:29:56 -04:00
|
|
|
/** returns base64 encoded string */
|
|
|
|
|
std::string B64Encode(const uint8_t *data, const std::size_t l);
|
2017-04-14 06:24:53 -04:00
|
|
|
|
2017-10-17 10:29:56 -04:00
|
|
|
/** @brief returns true if decode was successful */
|
|
|
|
|
bool B64Decode(const std::string &data, std::vector<uint8_t> &out);
|
2017-10-24 08:51:21 -04:00
|
|
|
|
|
|
|
|
/** returns base32 encoded string */
|
|
|
|
|
std::string B32Encode(const uint8_t *data, const std::size_t l);
|
|
|
|
|
|
|
|
|
|
/** @brief returns true if decode was successful */
|
|
|
|
|
bool B32Decode(const std::string &data, std::vector<uint8_t> &out);
|
|
|
|
|
|
2016-10-15 12:37:59 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|