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
MD5 Hash a String to a Base64, Hex, or URL-Encoded StringDownload: Chilkat .NET Assemblies C# code showing how to MD5 hash a string returning the result as an encoded string. // Create an instance of the Chilkat encryption class. Chilkat.Crypt2 crypt = new Chilkat.Crypt2(); // Any code begins the 30-day trial. crypt.UnlockComponent("30-day-trial"); // Set the hashing algorithm crypt.HashAlgorithm = "md5"; // Indicate that we want Base-64 output. crypt.EncodingMode = "base64"; string inputString = "This string is to be hashed."; string hashStr = crypt.HashStringENC(inputString); MessageBox.Show(hashStr); // Return the hash as a hexidecimalized string. crypt.EncodingMode = "hex"; hashStr = crypt.HashStringENC(inputString); MessageBox.Show(hashStr); // Return the hash as a URL-Encoded string. crypt.EncodingMode = "url"; hashStr = crypt.HashStringENC(inputString); MessageBox.Show(hashStr); Important: The download for this
example does not contain the ChilkatDotNet.dll which |
© 2000-2012 Chilkat Software, Inc. All Rights Reserved.