Hash$

Takes two parameters, Source, Options

Description:

Returns a hash (message digest) of the given source value.

The following standard algorithms are supported and may be specified in the Options parameter:

If one of the above algorithms is not specified, Moxie.Build uses an algorithm based on AES that outputs 256 bits.

A second space-separated value in the Options parameter of Base64 may be specified to output a Base64 string instead of hexadecimal.

Example:

[New] Data      =   "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
[New] Output

Output          =   Hash$ Data
HtmlAlert           ("Hash$ Moxie in Hex = " & Output)
Output          =   Hash$ Data, "Base64"
HtmlAlert           ("Hash$ Moxie in B64 = " & Output)

Output          =   Hash$ Data, "SHA1"
HtmlAlert           ("Hash$ SHA1 in Hex = " & Output)
Output          =   Hash$ Data, "SHA1 Base64"
HtmlAlert           ("Hash$ SHA1 in B64 = " & Output)

Output          =   Hash$ Data, "SHA256"
HtmlAlert           ("Hash$ SHA256 in Hex = " & Output)
Output          =   Hash$ Data, "SHA256 Base64"
HtmlAlert           ("Hash$ SHA256 in B64 = " & Output)

Output          =   Hash$ Data, "SHA384"
HtmlAlert           ("Hash$ SHA384 in Hex = " & Output)
Output          =   Hash$ Data, "SHA384 Base64"
HtmlAlert           ("Hash$ SHA384 in B64 = " & Output)

Output          =   Hash$ Data, "SHA512"
HtmlAlert           ("Hash$ SHA512 in Hex = " & Output)
Output          =   Hash$ Data, "SHA512 Base64"
HtmlAlert           ("Hash$ SHA512 in B64 = " & Output)

Output          =   Hash$ Data, "MD5"
HtmlAlert           ("Hash$ MD5 in Hex = " & Output)
Output          =   Hash$ Data, "MD5 Base64"
HtmlAlert           ("Hash$ MD5 in B64 = " & Output)