Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
HAVAL Hash a String returning a Base64 Hash String Source code to HAVAL hash a string, returning the hash value as a Base64 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 "HAVAL"
crypt.HashAlgorithm = "HAVAL"
' Tell the encryption object to return a base64 encoded string.
crypt.EncodingMode = "base64"
' EncodingMode can be set to "URL", "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 text line " & i & vbCrLf
Next
TextBox1.Text = str
' Create a HAVAL hash, returning the result as a base64 encoded string.
TextBox2.Text = crypt.HashStringENC(str)
Important: The download for this
example does not contain the ChilkatDotNet.dll which |
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2007 Chilkat Software, Inc. All Rights Reserved.