(PHP ActiveX) Example: Crypt2.AddPfxSourceBd method
Demonstrates how to call the AddPfxSourceBd method.
<?php
// For versions of Chilkat < 10.0.0, use new COM('Chilkat_9_5_0.Chilkat.Crypt2')
$crypt = new COM("Chilkat.Crypt2");
$success = 0;
// Do public-key decryption (RSA)
$crypt->CryptAlgorithm = 'pki';
// ...
// ...
// ...
// For versions of Chilkat < 10.0.0, use new COM('Chilkat_9_5_0.Chilkat.BinData')
$bdPfx = new COM("Chilkat.BinData");
$success = $bdPfx->LoadFile('c:/my_pfx_files/a.pfx');
// ...
$pfxPassword = 'secret1';
$success = $crypt->AddPfxSourceBd($bdPfx,$pfxPassword);
if ($success == 0) {
print $crypt->LastErrorText . "\n";
exit;
}
// Add as many as PFX sources as desired...
$success = $bdPfx->LoadFile('c:/my_pfx_files/b.pfx');
$pfxPassword = 'secret2';
$success = $crypt->AddPfxSourceBd($bdPfx,$pfxPassword);
if ($success == 0) {
print $crypt->LastErrorText . "\n";
exit;
}
// ...
// ...
?>
|