public static bool IsPasswordOK(string password, User user) { var cryptedPassword = new Crypto().Encrypt(password); return cryptedPassword.Equals(user.PasswordCrypted); }