Invalid Operation : -207

this sample i have error Invalid Operation : -207

delphi 13
tms crypto 5.0.9.7
encrypt-decrypt-tms.zip (2.0 KB)

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);

Thank you Bernard, it's work.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.