(PHP Extension) Example: Crypt2.AddPfxSourceBd method
Demonstrates how to call the AddPfxSourceBd method.
<?php
include("chilkat.php");
// Use "chilkat_9_5_0.php" for versions of Chilkat < 10.0.0
$crypt = new CkCrypt2();
$success = false;
// Do public-key decryption (RSA)
$crypt->put_CryptAlgorithm('pki');
// ...
// ...
// ...
$bdPfx = new CkBinData();
$success = $bdPfx->LoadFile('c:/my_pfx_files/a.pfx');
// ...
$pfxPassword = 'secret1';
$success = $crypt->AddPfxSourceBd($bdPfx,$pfxPassword);
if ($success == false) {
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 == false) {
print $crypt->lastErrorText() . "\n";
exit;
}
// ...
// ...
?>
|