7#include <boost/test/unit_test.hpp>
12using namespace std::literals;
18 static const std::string
vstrIn[] = {
"",
"f",
"fo",
"foo",
"foob",
"fooba",
"foobar"};
19 static const std::string
vstrOut[] = {
"",
"my======",
"mzxq====",
"mzxw6===",
"mzxw6yq=",
"mzxw6ytb",
"mzxw6ytboi======"};
20 static const std::string
vstrOutNoPadding[] = {
"",
"my",
"mzxq",
"mzxw6",
"mzxw6yq",
"mzxw6ytb",
"mzxw6ytboi"};
21 for (
unsigned int i=0; i<std::size(
vstrIn); i++)
BOOST_AUTO_TEST_CASE(base32_testvectors)
BOOST_AUTO_TEST_SUITE_END()
#define BOOST_CHECK_EQUAL(v1, v2)
#define BOOST_CHECK(expr)
std::optional< std::vector< unsigned char > > DecodeBase32(std::string_view str)
std::string EncodeBase32(std::span< const unsigned char > input, bool pad)
Base32 encode.
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.