예제 #1
0
    public static bool AuthenticateUser(string UserName, string Password)
    {
        var Result            = false;
        var EncryptedUserName = Ciphering.Encrypt(UserName);
        var EncryptedPassword = Ciphering.Encrypt(Password);

        var UserNameInConfig = Convert.ToString(ConfigurationManager.AppSettings["UserName"]);
        var PasswordInConfig = Convert.ToString(ConfigurationManager.AppSettings["Password"]);

        if (EncryptedUserName == UserNameInConfig && EncryptedPassword == PasswordInConfig)
        {
            Result = true;
        }
        return(Result);
    }
예제 #2
0
    protected void btnConvert_Click(object sender, EventArgs e)
    {
        var BaseText = txtInput.Text;

        Response.Write(Ciphering.Encrypt(BaseText));
    }