Sample code for 30+ languages & platforms
Lua

Example: Crypt2.AddPfxSourceFile method

Demonstrates how to call the AddPfxSourceFile method.

Chilkat Lua Downloads

Lua
local chilkat = require("chilkat")

local crypt = chilkat.Crypt2.new()
local success = false

-- Do public-key decryption (RSA)
crypt.crypt_algorithm = "pki"

-- ...
-- ...
-- ...

local pfxPath = "c:/my_pfx_files/a.pfx"
local pfxPassword = "secret1"
success = crypt:add_pfx_source_file(pfxPath, pfxPassword)
if not success then
    print(crypt.last_error_text)
    return
end

-- Add as many as PFX sources as desired...
pfxPath = "c:/my_pfx_files/b.pfx"
pfxPassword = "secret2"
success = crypt:add_pfx_source_file(pfxPath, pfxPassword)
if not success then
    print(crypt.last_error_text)
    return
end

-- ...
-- ...