Chilkat HOME Android™ ASP Visual Basic VB.NET C# iOS (IPhone) Objective-C C++ C Unicode C++ Unicode C MFC Delphi DLL Delphi ActiveX FoxPro Java Perl PHP Extension PHP ActiveX Python PowerShell Ruby SQL Server VBScript
(Ruby) PKCS7 Decrypt MIMELoads a PKCS7 encrypted MIME file and decrypts. The cert and private key used for decryption is loaded from a PFX file. Downloads for Windows/Linux and Install Instructions require 'chilkat' mime = Chilkat::CkMime.new() success = mime.UnlockComponent("Anything for 30-day trial.") if (success == false) print mime.lastErrorText() + "\n"; exit end # Load the MIME success = mime.LoadMimeFile("encryptedMime.txt") if (success == false) print mime.lastErrorText() + "\n"; exit end # The AddPfxSourceFile and/or AddPfxSourceData # methods may be called one or more times (one per PFX) # to add sources from which the MIME component will # search for certificates and private keys when decrypting. pfxPassword = "myPassword" success = mime.AddPfxSourceFile("myCertAndPrivateKey.pfx",pfxPassword) if (success == false) print mime.lastErrorText() + "\n"; exit end # Decrypt... success = mime.Decrypt() if (success == false) print mime.lastErrorText() + "\n"; exit end # Display the decrypted MIME: print mime.getMime() + "\n"; |
© 2000-2013 Chilkat Software, Inc. All Rights Reserved.