$WBHASH - calculate hash/digest

Availability
$WBHASH is available for use with all WBSP commands.

Syntax
$WBHASH{AlgType|data|OutputType}
$WBHASH[AlgType|data|OutputType]

Parameters
AlgType - algorithm type that will be used. Valid types are MD5, SHA1, SHA256, SHA384, SHA512.
data - the string to be digested
OutputType - optional parameter  - defines the output format. Valid types are H for hexadecimal (default), T for text and B for Base64 encoded string. 


Returns
The hash/digest value of string formated as hexadecimal value, text or Base64 encoded string.

Example

<!--
[FormFields]
wb_command=R
-->
<!--WB_BeginTemplate-->
<html>
<head>
<title>WBHASH</title>
</head>
<body>
Original text: this is text to be digested<br>
MD5 Hash: $WBHASH[MD5|this is text to be digested|B]
</body>
</html> 

After running this example, the resulting page in browser should look like this:

Original text: this is text to be digested
MD5 Hash: GlFJb6uRzUC7MeLUBLdVzg==