Delphi ActiveX
Delphi ActiveX
Example: Crypt2.AddPfxSourceBd method
Demonstrates how to call the AddPfxSourceBd method.Chilkat Delphi ActiveX Downloads
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Chilkat_TLB;
...
procedure TForm1.Button1Click(Sender: TObject);
var
success: Integer;
crypt: TChilkatCrypt2;
bdPfx: TChilkatBinData;
pfxPassword: WideString;
begin
success := 0;
crypt := TChilkatCrypt2.Create(Self);
success := 0;
// Do public-key decryption (RSA)
crypt.CryptAlgorithm := 'pki';
// ...
// ...
// ...
bdPfx := TChilkatBinData.Create(Self);
success := bdPfx.LoadFile('c:/my_pfx_files/a.pfx');
// ...
pfxPassword := 'secret1';
success := crypt.AddPfxSourceBd(bdPfx.ControlInterface,pfxPassword);
if (success = 0) then
begin
Memo1.Lines.Add(crypt.LastErrorText);
Exit;
end;
// Add as many as PFX sources as desired...
success := bdPfx.LoadFile('c:/my_pfx_files/b.pfx');
pfxPassword := 'secret2';
success := crypt.AddPfxSourceBd(bdPfx.ControlInterface,pfxPassword);
if (success = 0) then
begin
Memo1.Lines.Add(crypt.LastErrorText);
Exit;
end;
// ...
// ...
end;