03-08-2021, 01:05 PM
سلام عليكم
مثال
جهزت لك شرح لكيفية الاستعمال هنا
مثال
كود :
procedure TForm1.Button1Click(Sender: TObject);
var sLibrary : TCryptographicLibrary;
sCodec : TCodec;
str1, Cr, Dec : string;
sEncoding : TEncoding;
begin
str1 := 'delphi4arab.net this is text ....';
sLibrary := TCryptographicLibrary.Create(Self);
sCodec := TCodec.Create(Self);
try
sCodec.CryptoLibrary := sLibrary;
sCodec.StreamCipherId := 'native.StreamToBlock';
sCodec.BlockCipherId := 'native.AES-256';
sCodec.ChainModeId := 'native.ECB';
sCodec.Password := 'password';
sCodec.EncryptString(str1, Cr, sEncoding.ANSI);
sCodec.DecryptString(Dec, Cr, sEncoding.ANSI);
finally
sCodec.Free;
sLibrary.Free;
end;
Edit1.Text := Cr;
Edit2.Text := Dec;
end;جهزت لك شرح لكيفية الاستعمال هنا