BlogEngine.Core.Providers.XmlMembershipProvider.CheckPassword C# (CSharp) Method

CheckPassword() private method

The check password.
private CheckPassword ( string storedPassword, string inputPassword ) : bool
storedPassword string /// The stored password. ///
inputPassword string /// The input password. ///
return bool
        private bool CheckPassword(string storedPassword, string inputPassword)
        {
            var validated = false;
            if (storedPassword == string.Empty)
            {
                // This is a special case used for resetting.
                if (string.Compare(inputPassword, "admin", true) == 0)
                {
                    validated = true;
                }
            }
            else
            {
                if (this.passwordFormat == MembershipPasswordFormat.Hashed)
                {
                    if (storedPassword == Utils.HashPassword(inputPassword))
                    {
                        validated = true;
                    }
                }
                else if (inputPassword == storedPassword)
                {
                    validated = true;
                }
            }

            return validated;
        }