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

Verify Java Signature

Demonstrates how to verify a digital signature produced by Java.
The Java code that produces a digital signature that can be verified with
this Chilkat example is found at: http://www.cknotes.com/?p=283

Download 32-bit Chilkat RSA ActiveX (.msi)

Download All 32-bit Chilkat ActiveX Components (.zip)

Download All 64-bit Chilkat ActiveX Components (.zip)

LOCAL loPubKey
LOCAL lnSuccess
LOCAL lcPkeyXml
LOCAL loRsa
LOCAL lcStrData
LOCAL lcBase64Sig


loPubKey = CreateObject('Chilkat.PublicKey')

*  Load an RSA public key from an ASN.1 DER file
lnSuccess = loPubKey.LoadRsaDerFile("pubKey.der")

IF (lnSuccess <> 1) THEN
    ? loPubKey.LastErrorText
    QUIT
ENDIF

*  Get the public key in XML format:
lcPkeyXml = loPubKey.GetXml()

loRsa = CreateObject('Chilkat.Rsa')

*  Any string argument automatically begins the 30-day trial.

lnSuccess = loRsa.UnlockComponent("30-day trial")
IF (lnSuccess <> 1) THEN
    ? loRsa.LastErrorText
    QUIT
ENDIF

*  Import the public key into the RSA component:
lnSuccess = loRsa.ImportPublicKey(lcPkeyXml)
IF (lnSuccess <> 1) THEN
    ? loRsa.LastErrorText
    QUIT
ENDIF

loRsa.EncodingMode = "base64"

lcStrData = "The quick brown fox jumps over the lazy dog"

*  IMPORTANT:  This Base64 signature will have to be updated
*  with the digital signature produced by the Java code at:
*  http://www.cknotes.com/?p=283

lcBase64Sig = "VGV5A+bodHBpBwwJZdf17Bv+lkBTm/gteOf8iCgEEfNzBosZLaAB8X55BIZIkE2zKRXoMcJT+iCxsj+1hnlwJeKZ+Gya58lrHw6NWm2N0O/KyfnuEzADOM86X0xrkgdFT6SYpbZ9dWPC59NiHeEdVyjOXNJ3fBpUSQ5/5pvVWm0="

*  Verify the signature produced by the Java code at:
*  http://www.cknotes.com/?p=283
*  The VerifyStringENC method hashes the input data and verifies
*  the hash against the signature.
lnSuccess = loRsa.VerifyStringENC(lcStrData,"sha-1",lcBase64Sig)
*  Is the signature verified?
IF (lnSuccess = 1) THEN
    ? "Signature Verified!"
ELSE
    ? "Signature not verified!"
ENDIF


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

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