1#include <xrpl/basics/base64.h>
3#include <doctest/doctest.h>
24 check(
"foob",
"Zm9vYg==");
25 check(
"fooba",
"Zm9vYmE=");
26 check(
"foobar",
"Zm9vYmFy");
30 "Man is distinguished, not only by his reason, but by this "
31 "singular passion from "
32 "other animals, which is a lust of the mind, that by a "
33 "perseverance of delight "
34 "in the continued and indefatigable generation of knowledge, "
36 "vehemence of any carnal pleasure.",
37 "TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dC"
39 "IHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIG"
41 "dGhlIG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aG"
43 "dWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdlLCBleG"
45 "ZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4=");
void check(bool condition, std::string const &message)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::string base64_decode(std::string_view data)
std::string base64_encode(std::uint8_t const *data, std::size_t len)