PowerShell
PowerShell
Example: Crypt2.AddPfxSourceBd method
Demonstrates how to call the AddPfxSourceBd method.Chilkat PowerShell Downloads
Add-Type -Path "C:\chilkat\ChilkatDotNet47-x64\ChilkatDotNet47.dll"
$success = $false
$crypt = New-Object Chilkat.Crypt2
$success = $false
# Do public-key decryption (RSA)
$crypt.CryptAlgorithm = "pki"
# ...
# ...
# ...
$bdPfx = New-Object Chilkat.BinData
$success = $bdPfx.LoadFile("c:/my_pfx_files/a.pfx")
# ...
$pfxPassword = "secret1"
$success = $crypt.AddPfxSourceBd($bdPfx,$pfxPassword)
if ($success -eq $false) {
$($crypt.LastErrorText)
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 -eq $false) {
$($crypt.LastErrorText)
exit
}
# ...
# ...