public static void ValidateValue(string value, string hash)
        {
            var computedHash = SecuredValueHashComputer.GetHash(value);

            if (computedHash != hash)
            {
                throw new PermissionsException("Unexpected field was edited.");
            }
        }
 private static HtmlString GetHashFieldHtml(HtmlHelper htmlHelper, string name, string value)
 {
     return(htmlHelper.Hidden(SecuredValueFieldNameComputer.GetSecuredValueFieldName(name), SecuredValueHashComputer.GetHash(value)));
 }