Please, see Issue with Decryption in TMSCryptography v5.0.9.5 (Error -208) - #2 by Bernard
In Encrypt:
lAES.outputFormat := base64url;
In Decrypt, you need to add:
var
conv: TConvert
begin
conv := TConvert.Create(base64url);
...
lAES.outputFormat := raw; // to get the original text
AValue := conv.FormatToChar(AValue);
Result := lAES.Decrypt(AValue);