FoxPro Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

Visual FoxPro Examples

Bounced Mail
Character Encoding
Digital Certificates
Digital Signatures
Email
FTP
HTML-to-XML
HTTP
IMAP
Encryption
MHT / HTML Email
RSA Encryption
S/MIME
Socket
Spider
String
Tar
Upload
XML
XMP
Zip Compression
Self-Extractor

More Examples...
Email Object
POP3
SMTP
RSS
Atom
Byte Array
Service
PPMD
Deflate
DH Key Exchange
DSA
SSH Key
SSH
SSH Tunnel
SFTP

Unreleased...
Bzip2
LZW
Bz2
Icon

 

Non-Chilkat Links
Text and String Handling

Using a .NET .snk Key File for RSA Encryption

Demonstrates how to load and use a .NET .snk key file for RSA encryption. SNK files are created by the Microsoft .NET Strong Name Tool (Sn.exe).

Download Chilkat RSA ActiveX

LOCAL loRsa
LOCAL lnSuccess
LOCAL lcXmlKey
LOCAL lnBUsePrivateKey
LOCAL lcEncryptedText
LOCAL lcDecryptedText

loRsa = CreateObject('Chilkat.Rsa')

lnSuccess = loRsa.UnlockComponent("Anything for 30-day trial")
IF (lnSuccess <> 1) THEN
    =MESSAGEBOX("RSA component unlock failed")
    QUIT
ENDIF

*  Load a public/private key pair from a .snk key file.

lcXmlKey = loRsa.SnkToXml("chilkat2.snk")

? lcXmlKey

*  The xmlKey contains both public and private keys.
*  Import either the public or private for encrypting or
*  decrypting.
loRsa.ImportPrivateKey(lcXmlKey)

lnBUsePrivateKey = 1

lcEncryptedText = loRsa.EncryptStringENC("Hello World!",lnBUsePrivateKey)

? lcEncryptedText

*  Now decrypt with the public key:
loRsa.ImportPublicKey(lcXmlKey)
lnBUsePrivateKey = 0

lcDecryptedText = loRsa.DecryptStringENC(lcEncryptedText,lnBUsePrivateKey)

? lcDecryptedText

*  Note: We could have just as well encrypted using the public key
*  and decrypted using the private key.

Need a specific example? Send a request to support@chilkatsoft.com

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

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