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

 

 

 

 

 

 

 

SHA-1 and SHA-256 in Visual Basic 6.0

Download Chilkat Crypt ActiveX

Demonstrates SHA-1 and SHA-256 in VB6.

Private Sub Command16_Click()

    Dim crypt As New ChilkatCrypt2
    crypt.UnlockComponent "anything for 30-day trial"
    
    crypt.HashAlgorithm = "SHA-1"
    crypt.EncodingMode = "hex"
    
    s = "The quick brown fox jumps over the lazy dog"
    
    sHex = crypt.HashStringENC(s)
    ' Displays: 2FD4E1C67A2D28FCED849EE1BB76E7391B93EB12
    ' This is identical to the results published at http://en.wikipedia.org/wiki/SHA-1
    ' (assuming the Wikipedia page has not changed since 20-Nov-2006)
    MsgBox "SHA-1: " + sHex
    
    crypt.HashAlgorithm = "SHA-256"
    
    sHex = crypt.HashStringENC(s)
    ' Displays: D7A8FBB307D7809469CA9ABCB0082E4F8D5651E46D3CDB762D02D0BF37C9E592
    ' This is identical to the results published at http://en.wikipedia.org/wiki/SHA-1
    ' (assuming the Wikipedia page has not changed since 20-Nov-2006)
    MsgBox "SHA-256: " + sHex
    
    
End Sub

 

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