Go
Go
MD4 Hash a String
See more Encryption Examples
MD4 hash a string.Chilkat Go Downloads
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
crypt := chilkat.NewCrypt2()
content := "The quick brown fox jumps over the lazy dog"
// The desired output is a hexidecimal string:
crypt.SetEncodingMode("hex")
// Set the hash algorithm:
crypt.SetHashAlgorithm("md4")
var hashStr *string = new(string)
hashStr = crypt.HashStringENC(content)
fmt.Println(*hashStr)
// The output is:
// 1BEE69A46BA811185C194762ABAEAE9
crypt.DisposeCrypt2()