ph_getmd5hash1 PowerHome formula (Deprecated)
function
Description
Returns the standard MD5 hash for the
specified string of data.
Syntax
ph_getmd5hash1 ( data, type )
Argument |
Description |
data |
String. The data you'd like the MD5 calculated for. |
type |
Integer. Specifies how the data in the
data parameter is to be interpreted for calculating MD5. See usage
below. |
Return value
String. Returns the MD5 hash as a string of
hex digits.
Usage
Use this function to calculate general MD5
hashes including hashes for binary data.
Below is the list of valid
values for the type parameter:
1 |
Takes the value in the data parameter and interprets is as full unicode data. |
2 |
The value in the data parameter is interpreted as
hexadecimal representations of binary characters. |
3 |
The value in the data parameter should point to a full path
and filename of a file that will be read in and the MD5 calculated for
it. |
Any other value |
Any other value for the type parameter
will interpret the value in the data parameter as ANSI
data. |
Examples
The following examples demonstrate typical
syntax/usage for this function.
ph_getmd5hash1("2020200D0A",2)
This example interprets the data parameter as a string of
hex characters with every 2 characters representing a byte of data. Hex 20
is a space char, 0D is carriage return, and 0A is line feed. This example will return the following MD5 hash:
0C544100BE9EEE1C4FA2BACA5B51E3B2