Delphi DLL
Delphi DLL
Example: Crypt2.AddPfxSourceFile method
Demonstrates how to call the AddPfxSourceFile method.Chilkat Delphi DLL Downloads
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Crypt2;
...
procedure TForm1.Button1Click(Sender: TObject);
var
success: Boolean;
crypt: HCkCrypt2;
pfxPath: PWideChar;
pfxPassword: PWideChar;
begin
success := False;
crypt := CkCrypt2_Create();
success := False;
// Do public-key decryption (RSA)
CkCrypt2_putCryptAlgorithm(crypt,'pki');
// ...
// ...
// ...
pfxPath := 'c:/my_pfx_files/a.pfx';
pfxPassword := 'secret1';
success := CkCrypt2_AddPfxSourceFile(crypt,pfxPath,pfxPassword);
if (success = False) then
begin
Memo1.Lines.Add(CkCrypt2__lastErrorText(crypt));
Exit;
end;
// Add as many as PFX sources as desired...
pfxPath := 'c:/my_pfx_files/b.pfx';
pfxPassword := 'secret2';
success := CkCrypt2_AddPfxSourceFile(crypt,pfxPath,pfxPassword);
if (success = False) then
begin
Memo1.Lines.Add(CkCrypt2__lastErrorText(crypt));
Exit;
end;
// ...
// ...
CkCrypt2_Dispose(crypt);
end;