public ActionResult Unlock(UnlockerModel model) { var algorithm = new SHA256Cng(); var unicoding = new UnicodeEncoding(); var hashed = unicoding.GetString(algorithm.ComputeHash(unicoding.GetBytes(model.Passphrase))); if (hashed == "嘃ᥐ倹⦦듑ꈳ囬쀺诫谾臭ᰠ屯") { FormsAuthentication.SetAuthCookie("Manager", false); var url = Handy.BaseUrl() + (model.ReturnUrl ?? Url.Action("Unlock")); return(Redirect(url)); } ModelState.AddModelError("AuthenticationFailed", "Wrong Passphrase"); return(View()); }
public ActionResult Lock() { FormsAuthentication.SignOut(); return(Redirect(Handy.BaseUrl() + "/Home")); }
public string Permalink(UrlHelper url) { return(string.Format("{0}{1}/{2}", Handy.BaseUrl(), url.Action("Post", "Blog"), Slug)); }
public string ThumbnailLink(UrlHelper url) { return(string.Format("{0}{1}/{2}", Handy.BaseUrl(), url.Action("Thumbnail", "Blog"), Slug)); }