public static MD5VerifyString ( string input, string hash ) : System.Boolean | ||
input | string | The string to compare. |
hash | string | The hash to compare against. |
return | System.Boolean |
public static Boolean MD5VerifyString(string input, string hash)
{
Boolean retVal = false;
// Hash the input.
string hashOfInput = MD5String(input);
// Create a StringComparer an comare the hashes.
StringComparer comparer = StringComparer.OrdinalIgnoreCase;
if (0 == comparer.Compare(hashOfInput, hash))
{
retVal = true;
}
return retVal;
}