Visual Basic Examples

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

VB Examples

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

More Examples...
Amazon S3
Email Object
DKIM / DomainKey
NTLM
DH Key Exchange
DSA
FileAccess
RSS
Atom
Self-Extractor
Service
Bzip2
PPMD
Deflate
LZW


VB Strings
VB Byte Array

 

 

 

 

 

 

 

Create S/MIME Detached Digital Signature

Download Chilkat MIME ActiveX

This VB example program shows how to create a detached digital signature. An input file is loaded into a MIME message as an attachment, and then the MIME message is signed to create an x-pkcs7-signature message with a detached signature.

' Converts any kind of file into an S/MIME message with
' a detached (clear-text) signature.
Private Sub Command1_Click()

        Dim mime As New ChilkatMime

        mime.UnlockComponent "Anything for 30-day trial"
        mime.SetBodyFromPlainText "This is a message containing a GIF image file."
        mime.AppendPartFromFile "dude.gif"
        mime.SaveMime "unsigned.txt"

        ' Locate a certificate in the Current User Store (in the registry)
        ' There are many different ways of locating and using certificates
        ' using Cert, CertStore and CreateCS.
        Dim ccs As New ChilkatCreateCS
        Dim certStore As ChilkatCertStore
        Dim cert As ChilkatCert

        Set certStore = ccs.OpenCurrentUserStore()
        Set cert = certStore.FindCertForEmail("matt@chilkatsoft.com")

        ' Use the certificate for signing.
        ' This creates a message with a detached signature.
        mime.AddDetachedSignature cert
        mime.SaveMime "signed.txt"
        
        ' In addition, any MIME message can converted and saved as XML:
        mime.SaveXml "signed.xml"

End Sub




 

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