Error in Cryptopack on macOS64

Using Delphi Rio 10.3.2 and Croptypack 4.0.0.1 an latest macOS will raise an error in AES.EncryptFileW.
Create an empty fmx-form an put there button1 and TAESEncryption. Here is the code that shows where an error occurs:



unit Unit1;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs,
  FMX.Controls.Presentation, FMX.StdCtrls, System.IOUtils,
  IdBaseComponent, IdIntercept, IdBlockCipherIntercept,
  CryptBase,
  AESObj, ECCObj, SPECKObj, MiscObj, SalsaObj,
  RSAObj, HashObj, X509Obj, XAdESObj, FMX.ScrollBox, FMX.Memo;

type
  TForm1 = class(TForm)
    Button1: TButton;
    AES: TAESEncryption;
    procedure Button1Click(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.fmx}

procedure TForm1.Button1Click(Sender: TObject);
var path, source, dest : String;
    sl : TStringList;

begin
  path := IncludeTrailingPathDelimiter(System.IOUtils.TPath.GetTempPath);
  source := path + 'test.txt';
  dest := path + 'test.aes';

  sl := TStringList.Create;
  sl.Add('This ist line 1.');
  sl.Add('Another line.');
  sl.Add('Last line.');
  sl.SaveToFile(path+'test.txt');
  sl.Free;

  Form1.AES.AType := atCTR;
  Form1.AES.KeyLength := kl256;
  Form1.AES.key := 'Testpasswortxxxxxxxxxxxxxxxxxxxx';

  // the following line will rise an error
  Form1.AES.EncryptFileW(source, dest);

          // -->> Errorposition in EncryptFileW:     self.EncryptStream(stream1, TStream(stream2));
                  // Errorposition in EncryptStream:      AESEncryptionLoop(P, C, w, self.FKeyLengthNum div 32, self.FType, IVc);
                          // Errorposition in AESEncryptionLoop:      err := Cipher_aes(IVc, C, w, Nk);

end;
end.

Hi, 

I am currently working to fix this bug.
Best regards,
Marion