#1 mORMot 1 » AES rijndael for delphi firemonkey » 2016-06-07 12:12:13

acarlomagno
Replies: 1

Hello,
I would use the syncrypto in Delphi Firemonkey ios and android project.

I have problem to compile ... I tried this code ... but I have many compile errors.

the units are not compatible

kind regards
Antonello

---

Uses ...SynCommons, SynCrypto...

procedure TForm1.Button1Click(Sender: TObject);
var
  aes: TAESCBC;
  iv: TAESBlock;
begin
  FillChar(iv, 16, 65); // 65 = A
  aes := TAESCBC.Create(AnsiString('AAAAAAAAAAAAAAAA'), 128, iv);
  Edit1.Text := BinToBase64(aes.EncryptPKCS7('test'));
  aes.Free;
end;

Board footer

Powered by FluxBB