Archived Forum Post

Index of archived forum posts

Question:

MD5 hash required from classic ASP chilkat encryption

Sep 13 '16 at 07:57

I need to prepare an MD5 hash for a login system. They have provided me with a c# function for producing it but I want to use my classic ASP Chilkat. This is the C# function

//C# MD5 hash function

public static string MD5Hash(string input)   
{  
  System.Security.Cryptography.MD5CryptoServiceProvider x = new    System.Security.Cryptography.MD5CryptoServiceProvider();  
  byte[] bs = System.Text.Encoding.UTF8.GetBytes(input);  
  bs = x.ComputeHash(bs);  
  System.Text.StringBuilder s = new System.Text.StringBuilder();  
  foreach (byte b in bs)  
  {  
    s.Append(b.ToString("x2").ToLower());  
  }  
  return s.ToString();  
}

The Problem I am having is which crypt.EncodingMode should i use as there are a few possibles :- "quoted-printable", "base64", "url", and "hex"

Cheers


Answer

Here's an example:

Android: MD5 Hash a String (such as a password string)

Classic ASP: MD5 Hash a String (such as a password string)

C: MD5 Hash a String (such as a password string)

C++: MD5 Hash a String (such as a password string)

C#: MD5 Hash a String (such as a password string)

C# UWP/WinRT: MD5 Hash a String (such as a password string)

DataFlex: MD5 Hash a String (such as a password string)

Delphi ActiveX: MD5 Hash a String (such as a password string)

Delphi DLL: MD5 Hash a String (such as a password string)

.NET Core C#: MD5 Hash a String (such as a password string)

Excel: MD5 Hash a String (such as a password string)

Visual FoxPro: MD5 Hash a String (such as a password string)

Java: MD5 Hash a String (such as a password string)

Lianja: MD5 Hash a String (such as a password string)

MFC: MD5 Hash a String (such as a password string)

Mono C#: MD5 Hash a String (such as a password string)

Node.js: MD5 Hash a String (such as a password string)

Objective-C: MD5 Hash a String (such as a password string)

Perl: MD5 Hash a String (such as a password string)

PHP ActiveX: MD5 Hash a String (such as a password string)

PHP Extension: MD5 Hash a String (such as a password string)

PowerBuilder: MD5 Hash a String (such as a password string)

PowerShell: MD5 Hash a String (such as a password string)

PureBasic: MD5 Hash a String (such as a password string)

Python: MD5 Hash a String (such as a password string)

Ruby: MD5 Hash a String (such as a password string)

SQL Server: MD5 Hash a String (such as a password string)

Swift: MD5 Hash a String (such as a password string)

Tcl: MD5 Hash a String (such as a password string)

Unicode C: MD5 Hash a String (such as a password string)

Unicode C++: MD5 Hash a String (such as a password string)

Visual Basic 6.0: MD5 Hash a String (such as a password string)

VB.NET: MD5 Hash a String (such as a password string)

VB.NET UWP/WinRT: MD5 Hash a String (such as a password string)

VBScript: MD5 Hash a String (such as a password string)

Xojo Plugin: MD5 Hash a String (such as a password string)