PowerShell
PowerShell
Example: Crypt2.AddPfxSourceFile method
Demonstrates how to call the AddPfxSourceFile 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"
# ...
# ...
# ...
$pfxPath = "c:/my_pfx_files/a.pfx"
$pfxPassword = "secret1"
$success = $crypt.AddPfxSourceFile($pfxPath,$pfxPassword)
if ($success -eq $false) {
$($crypt.LastErrorText)
exit
}
# Add as many as PFX sources as desired...
$pfxPath = "c:/my_pfx_files/b.pfx"
$pfxPassword = "secret2"
$success = $crypt.AddPfxSourceFile($pfxPath,$pfxPassword)
if ($success -eq $false) {
$($crypt.LastErrorText)
exit
}
# ...
# ...