Example #1
0
        public bool ValidateLogin(Login login)
        {
            byte[] shaPassword = CryptoUtils.GetSha1(login.Password);

            if (shaPassword.SequenceEqual(this.ConfigurationService.GetConfiguration().Password) == false)
            {
                throw new LoginException();
            }

            return true;
        }
Example #2
0
 public LoginViewModel(ILoginService LoginService)
 {
     this.LoginService = LoginService;
     this.Login = new Login();
     ValidateLoginCommand = new RelayCommand(ValidateLogin);
 }