Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
Create an MD5 HashDownload: Chilkat .NET Assemblies Simple C# example source code to create an MD5 hash. NOTE: This example uses the Chilkat.Crypt class, not Chilkat.Crypt2 // C# sample code to create an MD5 hash.
private void HashMD5_Click(object sender, System.EventArgs e)
{
Chilkat.Crypt crypt = new Chilkat.Crypt();
crypt.UnlockComponent("TempCode");
// Generate some byte data.
byte[] inData = new byte[1000];
int i;
for (i=0; i<1000; i++)
{
inData[i] = Convert.ToByte(i % 255);
}
// Create an MD5 hash.
byte[] hash = crypt.DigestMD5(inData);
// We cannot display binary data, so convert it
// to Base64 and display.
textBox1.Text = crypt.EncodeBase64(hash);
}
|
© 2000-2012 Chilkat Software, Inc. All Rights Reserved.