(PHP Extension) Workaround for the deprecated Crypt2.AddPfxSourceData method
Shows how to replace the deprecated AddPfxSourceData method. (Chilkat is moving away from the use of CkByteData.) Note: This example requires Chilkat v11.0.0 or greater.
<?php
include("chilkat.php");
// Use "chilkat_9_5_0.php" for versions of Chilkat < 10.0.0
$crypt = new CkCrypt2();
$path = 'c:/data/example.pfx';
$pfxPassword = 'secret';
// ------------------------------------------------------------------------
// The AddPfxSourceData method is deprecated:
$inData = new CkByteData();
$inData->loadFile($path);
$success = $crypt->AddPfxSourceData($inData,$pfxPassword);
// ------------------------------------------------------------------------
// Workaround.
// (Chilkat is moving away from using CkByteData)
$bdIn = new CkBinData();
$bdIn->LoadFile($path);
$success = $crypt->AddPfxSourceBd($bdIn,$pfxPassword);
?>
|