VB.NET Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript



VB.NET Examples

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

More Examples...
Email Object
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA

Byte Array
VB.NET FTPS
System.IO

Unreleased...
Bzip2
LZW
Icon

 

 

 

 

 

 

SHA-1 Hash a String returning a URL-Encoded Hash String

Source code to SHA-1 hash a string, returning the hash value as a url-encoded string.

        ' This example uses the Chilkat .NET encryption library, which can be downloaded
        ' at http://www.chilkatsoft.com/downloads.asp

        ' Create an instance of the Chilkat encryption class.
        Dim crypt As New Chilkat.Crypt2()

        ' Any code begins the 30-day trial.
        crypt.UnlockComponent("30-day-trial")

        ' Set the hash algorithm to "sha-1"
        crypt.HashAlgorithm = "SHA-1"

        ' Tell the encryption object to return a url-encoded string.
        crypt.EncodingMode = "url"
        ' EncodingMode can be set to "Base64", "QP", or "Hex" also.

        ' Generate some data to hash...
        Dim str As String
        Dim i As Integer
        For i = 1 To 10
            str = str + "This is line " & i & vbCrLf
        Next
        TextBox1.Text = str

        ' Create an SHA-1 hash, returning the result as a url-encoded string.
        TextBox2.Text = crypt.HashStringENC(str)




Important: The download for this example does not contain the ChilkatDotNet.dll which
must be downloaded and installed separately at http://www.chilkatsoft.com/downloads.asp.
Once installed, add a reference to the DLL in the project by following the instructions at
http://www.example-code.com/vbdotnet/step2.asp

 

Need a specific example? Send a request to support@chilkatsoft.com

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

Mail Component · XML Parser