Hi,
I noticed that Base64URLDecoder exists but unfortunately, I am stuck with 5.6.2, which doesn't have it.
// my code snippet
std::string decoded_key;
const byte ALPHABET[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
int lookup[256];
CryptoPP::Base64Decoder::InitializeDecodingLookupArray(lookup, ALPHABET, 64, false);
try
{
CryptoPP::Base64Decoder* pDecoder = new CryptoPP::Base64Decoder();
pDecoder->IsolatedInitialize(CryptoPP::MakeParameters(CryptoPP::Name::DecodingLookupArray(),(const int *)lookup));
pDecoder->Attach(new CryptoPP::StringSink(decoded_key));
// Decode the key since it is base64url encoded
CryptoPP::StringSource src(key, true, pDecoder);
But then I got an exception:
AlgorithmParametersBase: parameter "DecodingLookupArray" not used
Am I missing something?
Thanks in advance!