FoxPro Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

Visual FoxPro Examples

Bounced Mail
Bz2
Character Encoding
CSV
Digital Certificates
Digital Signatures
Email
Email Object
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
POP3
RSA
S/MIME
Socket
Spider
SFTP
SMTP
SSH
SSH Key
SSH Tunnel
String
Tar
Upload
XML
XMP
Zip Compression
Self-Extractor

More Examples...
Amazon S3
DKIM / DomainKey
NTLM
RSS
Atom
Byte Array
Service
PPMD
Deflate
DH Key Exchange
DSA
FileAccess
Bzip2
LZW

 

Non-Chilkat Links
Text and String Handling

Decrypt MIME with PFX

Download Chilkat MIME ActiveX

Demonstrates how to decrypt MIME using a PFX (containing a digital certificate with private key). The content-type of an encrypted MIME message looks like this:

Content-Type: application/x-pkcs7-mime;
	name="smime.p7m"

LOCAL loMime
LOCAL lnSuccess
LOCAL loCertStore
LOCAL loCert
LOCAL loPrivKey

loMime = CreateObject('Chilkat.Mime')

lnSuccess = loMime.UnlockComponent("Anything for 30-day trial")
IF (lnSuccess = 0) THEN
    =MESSAGEBOX("Failed to unlock component")
    QUIT
ENDIF

lnSuccess = loMime.LoadMimeFile("encryptedEmail.eml")
IF (lnSuccess <> 1) THEN
    ? loMime.LastErrorText
    QUIT
ENDIF

loCertStore = CreateObject('Chilkat.CertStore')
lnSuccess = loCertStore.LoadPfxFile("myPfx.pfx","myPfxPassword")
IF (lnSuccess <> 1) THEN
    ? loCertStore.LastErrorText
    QUIT
ENDIF

*  Find the certificate by email address.  There are many
*  ways to find certificates within a Chilkat certificate store
*  object...

loCert = loCertStore.FindCertBySubjectE("support@chilkatsoft.com")
IF (loCert = NULL ) THEN
    ? loCertStore.LastErrorText
    QUIT
ENDIF

loPrivKey = loCert.ExportPrivateKey()
IF (loPrivKey = NULL ) THEN
    ? loCert.LastErrorText
    RELEASE loCert
    QUIT
ENDIF

lnSuccess = loMime.Decrypt2(loCert,loPrivKey)
IF (lnSuccess <> 1) THEN
    ? loMime.LastErrorText
    QUIT
ENDIF

*  Show the decrypted MIME:
? loMime.GetMime()

RELEASE loCert
RELEASE loPrivKey


© 2000-2010 Chilkat Software, Inc. All Rights Reserved.

Mail Component · .NET Email Component · ASP Mail Component · XML Parser