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

EncryptEncoded: Decode-->Encrypt Bytes-->Encode

In some programming languages, it is very difficult to work with binary data. To help avoid these problems, two new methods have been added to the Chilkat Crypt2 component: EncryptEncoded and DecryptEncoded.

EncryptEncoded takes binary data in the form of an encoded string (base64, hex, etc.), decodes it, encrypts, and then encodes the encrypted output and returns an encoded string (base64, hex, etc.).

DecryptEncoded does the opposite. It accepts encrypted data in the form of an encoded string, decodes, decrypts, and then returns the result as an encoded string.

The encoding is determined by the EncodingMode property. It may be "base64", "hex", "url", "quoted-printable", etc.

Note: The EncryptEncoded and DecryptEncoded methods are unreleased at the time of this writing (08-April-2008) The next major Chilkat Crypt2 release after this date will include these new methods.

Download Chilkat Crypt ActiveX

LOCAL loCrypt
LOCAL lnSuccess
LOCAL lcCipherHex
LOCAL lcPlainTextHex

loCrypt = CreateObject('Chilkat.Crypt2')

lnSuccess = loCrypt.UnlockComponent("Anything for 30-day trial")
IF (lnSuccess <> 1) THEN
    *  Unlock failed.
    =MESSAGEBOX(loCrypt.LastErrorText)
    QUIT
ENDIF

loCrypt.CryptAlgorithm = "aes"
loCrypt.KeyLength = 128

*  The encrypted output will be a hex-encoded string.
*  It is also possible to use "base64", "url" (for url-encoding), and other modes.
loCrypt.EncodingMode = "hex"

*  Both ECB and CBC modes are available.
*  Use "ecb" for Electronic Cookbook Mode.
*  "cbc" is for Cipher-Block-Chaining.
loCrypt.CipherMode = "ecb"

*  Key (128): E8E9EAEBEDEEEFF0F2F3F4F5F7F8F9FA
*  Plaintext: 014BAF2278A69D331D5180103643E99A
*  Ciphertext: 6743C3D1519AB4F2CD9A78AB09A511BD

loCrypt.SetEncodedKey("E8E9EAEBEDEEEFF0F2F3F4F5F7F8F9FA","hex")

loCrypt.PaddingScheme = 3

lcCipherHex = loCrypt.EncryptEncoded("014BAF2278A69D331D5180103643E99A")
? lcCipherHex

lcPlainTextHex = loCrypt.DecryptEncoded(lcCipherHex)
? lcPlainTextHex

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

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