Chilkat Examples

ChilkatHOMEAndroid™Classic ASPCC++C#Mono C#.NET Core C#C# UWP/WinRTDataFlexDelphi ActiveXDelphi DLLVisual FoxProJavaLianjaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerBuilderPowerShellPureBasicPythonRubySQL ServerSwiftTclUnicode CUnicode C++Visual Basic 6.0VB.NETVB.NET UWP/WinRTVBScriptXojo PluginNode.jsExcel

Visual Basic 6.0 Examples


ASN.1
Amazon S3
Amazon S3 (new)
Amazon SES
Amazon SNS
Amazon SQS
Async
Azure Cloud Storage
Azure Service Bus
Bounced Email
Box
CSR
CSV
Certificates
Compression
DKIM / DomainKey
DSA
Diffie-Hellman
Digital Signatures
Dropbox
Dynamics CRM
ECC
Email Object
Encryption
FTP
Facebook
Firebase
GeoOp
Google APIs
Google Calendar
Google Cloud Storage
Google Drive
Gzip
HTML-to-XML/Text
HTTP
HTTP Misc
IMAP
JSON
JSON Web Encryption (JWE)
JSON Web Signatures (JWS)
JSON Web Token (JWT)
Java KeyStore (JKS)

Jira
MHT / HTML Email
MIME
Microsoft Graph
NTLM
OAuth1
OAuth2
OneDrive
OpenSSL
Outlook
PEM
PFX/P12
POP3
PRNG
PayPal
Peoplevox
QuickBooks
REST
REST Misc
RSA Encryption
SCP
SFTP
SMTP
SSH
SSH Key
SSH Tunnel
SharePoint
Shopify
Socket/SSL/TLS
Spider
Stream
Stripe
SugarCRM
Tar Archive
Twitter
VoiceBase
Walmart
WebSocket
XAdES
XML
XML Digital Signatures
XMP
Xero
Zip
curl
eBay

 

 

 

(Visual Basic 6.0) Generate a Unique Key for an Email

Demonstrates how to generate a unique key for an email.

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

Dim email As New ChilkatEmail

Dim success As Long
success = email.LoadEml("qa_data/eml/someEmail.eml")
If (success <> 1) Then
    Debug.Print email.LastErrorText
    Exit Sub
End If

'  The ComputeGlobalKey method computes a global unique key for an email that may be used as a
'  key for a relational database table (or anything else).
'  The key is created by a digest-MD5 hash of the concatenation of the following header fields:
'  Message-ID, Subject, From, Date, To. (The header fields are Q/B decoded if necessary,
'  converted to the utf-8 encoding, concatenated, and hashed using MD5.)
'  The 16-byte MD5 hash is returned as an encoded string (such as base64, url, hex, etc.)
'  If the bFold argument is true, then the 16-byte MD5 hash is folded to 8 bytes with an XOR to produce a shorter key.

Dim bFold As Long
bFold = 0
Dim key As String
key = email.ComputeGlobalKey("hex",bFold)
Debug.Print "key: " & key

 

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