1#include <xrpl/basics/base64.h>
3#include <doctest/doctest.h>
23 check(
"foob",
"Zm9vYg==");
24 check(
"fooba",
"Zm9vYmE=");
25 check(
"foobar",
"Zm9vYmFy");
28 "Man is distinguished, not only by his reason, but by this "
29 "singular passion from "
30 "other animals, which is a lust of the mind, that by a "
31 "perseverance of delight "
32 "in the continued and indefatigable generation of knowledge, "
34 "vehemence of any carnal pleasure.",
35 "TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dC"
37 "IHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIG"
39 "dGhlIG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aG"
41 "dWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdlLCBleG"
43 "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)