TMS Cryptography Pack Beta 5.0.6 instalation problem

Hi!
Since version 5.0.5 can't instal in Delphi 10.4.2.
Compiler can't find TFile.GetSize symbol in AESObj.pas

Line 1139 | Size := TFile.GetSize(inputPath);

Hi,
Is System.IOUtils present in Delphi 10.4.2?
Regards,
bernard

Hi!

Is System.IOUtils present in Delphi 10.4.2?
Yes but TFile have not GetSize method.

OK, here is a quick and dirty fix. In AESObj.pas, put these lines in comments (line 1139 and up):

Size := 1 shl 30; //  add this line

{ Size := TFile.GetSize(inputPath);

// Limit size to 1 GB chunks
if Size < MAXFILESIZE then begin
  SetLength(inputBuffer, Size);
  SetLength(outputBuffer, Size);
end
else
  raise Exception.Create('File is too big (> 1 GB)');

}
and do not try to encrypt files bigger than 1 GB for the moment.

Regards,
bernard

Hi!
The same at lines
1174 | Size := TFile.GetSize(outputPath);
1214 | Size := TFile.GetSize(inputPath);

Force a value for Size. It is adjusted when the file is read to the actual size value.

Not having any shares in EMB, I would still recommend that you upgrade to 12.3 at some stage :-)

Hi!
O.K. Thanks. It helped.

BTW. I cant upgrade Delphi to 12. I make comercial projects. New Delphi = upgrade all used libraries and many time to migrate and validate source code and then tests for all application.