Sample code for 30+ languages & platforms
Go

Example: Crypt2.AddPfxSourceBd method

Demonstrates how to call the AddPfxSourceBd method.

Chilkat Go Downloads

Go
    success := false

    crypt := chilkat.NewCrypt2()
    success = false

    // Do public-key decryption (RSA)
    crypt.SetCryptAlgorithm("pki")

    // ...
    // ...
    // ...

    bdPfx := 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()