public static void ValidateValue(NameValueCollection formValues, string name) { var value = formValues[name]; var hash = formValues[SecuredValueFieldNameComputer.GetSecuredValueFieldName(name)]; ValidateValue(value, hash); }
public static void ValidateMultipleValues(NameValueCollection formValues, string name, IEnumerable <string> names) { var valueToHash = new StringBuilder(); foreach (var n in names) { valueToHash.Append(formValues[n]); } ValidateValue(valueToHash.ToString(), formValues[SecuredValueFieldNameComputer.GetSecuredValueFieldName(name)]); }
private static HtmlString GetHashFieldHtml(HtmlHelper htmlHelper, string name, string value) { return(htmlHelper.Hidden(SecuredValueFieldNameComputer.GetSecuredValueFieldName(name), SecuredValueHashComputer.GetHash(value))); }