Sample code for 30+ languages & platforms
VBScript

MD4 Hash a String

See more Encryption Examples

MD4 hash a string.

Chilkat VBScript Downloads

VBScript
Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
'Create a Unicode (utf-16) output text file.
Set outFile = fso.CreateTextFile("output.txt", True, True)

' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.

set crypt = CreateObject("Chilkat.Crypt2")

content = "The quick brown fox jumps over the lazy dog"

' The desired output is a hexidecimal string:
crypt.EncodingMode = "hex"

' Set the hash algorithm:
crypt.HashAlgorithm = "md4"

hashStr = crypt.HashStringENC(content)

outFile.WriteLine(hashStr)

' The output is:
' 1BEE69A46BA811185C194762ABAEAE9

outFile.Close