Hello,
Same here this code :
var
Laes: TAESEncryption;
LCipher,LResultat: string;
begin
Laes:= TAESEncryption.Create;
try
Laes.AType:= atCBC;
Laes.KeyLength:= kl256;
Laes.Unicode := yesUni;
Laes.Key:= '12345678901234567890123456789012';
Laes.OutputFormat:= hexa;
Laes.PaddingMode:= TpaddingMode.PKCS7;
Laes.IVMode:= rand;
// Crypte
LCipher:= Laes.Encrypt('test');
Showmessage(LCipher);
// Uncrypt
Laes.Decrypt( LCipher,LResultat); // same with Laes.Decrypt( LCipher);
Showmessage(LResultat);
finally
Laes.Free;
end;
end;
The line :
Laes.Decrypt( LCipher,LResultat);
Raise random (99 % of time) ‘Invalid Operation ; -208’ error message on Delphi 11.3 and Delphi 12.3 (32 bits VCL). Version v5.0.9.5.Same code have no problem in version 4.X
And it's just a copy/paste from your "TMSCryptographyPack.pdf" !!!