(Go) Example: Crypt2.AddPfxSourceBd method
Demonstrates how to call the AddPfxSourceBd method.
crypt := Crypt2_Ref.html">chilkat.NewCrypt2()
success := false
// Do public-key decryption (RSA)
crypt.SetCryptAlgorithm("pki")
// ...
// ...
// ...
bdPfx := BinData_Ref.html">chilkat.NewBinData()
success = bdPfx.LoadFile("c:/my_pfx_files/a.pfx")
// ...
pfxPassword := "secret1"
success = crypt.AddPfxSourceBd(bdPfx,pfxPassword)
if success == false {
fmt.Println(crypt.LastErrorText())
crypt.DisposeCrypt2()
bdPfx.DisposeBinData()
return
}
// 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 {
fmt.Println(crypt.LastErrorText())
crypt.DisposeCrypt2()
bdPfx.DisposeBinData()
return
}
// ...
// ...
crypt.DisposeCrypt2()
bdPfx.DisposeBinData()
|