MD5

ASP VBScript code for generating an MD5 ‘digest’ or ‘signature’ of a string.  The MD5 algorithm is one of the industry standard methods for generating digital signatures.  It is generically known as a digest, digital signature, one-way encryption, hash or checksum algorithm.  A common use for MD5 is for password encryption as it is one-way in nature, that does not mean that your passwords are not free from a dictionary attack.

License

This is ‘free’ software with the following restrictions

You may not redistribute this code as a ‘sample’ or ‘demo’.  However, you are free to use the source code in your own code, but you may not claim that you created the sample code.  It is expressly forbidden to sell or profit from this source code other than by the knowledge gained or the enhanced value added by your own code.

Use of this software is also done so at your own risk.  The code is supplied as is without warranty or guarantee of any kind.

Should you wish to commission some derivative work based on this code provided here, or any consultancy work, please do not hesitate to contact us.

About

Summary
MD5
ASP VBScript code for generating an MD5 ‘digest’ or ‘signature’ of a string.
Use this method to encrypt your data.

Functions

encryptData

public function encryptData( sMessage )

Use this method to encrypt your data.

Parameters

(string)sMessage Data to be encrypted

Returns

(string) Encrypted version of the input data

Example

dim message : message = "This is a very secret message"
dim Encryptor
set Encryptor = new MD5
Response.write("Plain: " & message & "<br />")
Response.write("Encrypted: " & Encryptor.encryptData(message))
set Encryptor = nothing
public function encryptData( sMessage )
Use this method to encrypt your data.