protected void btnLogin_Click(object sender, EventArgs e) { string sal = Autentificacion.getSalt(txtUserName.Text.Trim()); string hash = txtHash.Value; if (this.txtUserName.Text == "Admin1") { if (this.txtPass.Value.Equals("Admin123456")) { Session["userlogin"] = "******"; Response.Redirect("principal.aspx"); } else { Response.Redirect("Login.aspx"); } } else if (Autentificacion.Autenticar(txtUserName.Text.Trim(), Seguridad.SHA512(hash + sal))) { Session["userlogin"] = "******"; Response.Redirect("principal.aspx"); } else { Response.Redirect("Login.aspx"); } }