Skip to content

Instantly share code, notes, and snippets.

@mikasjp
Created April 18, 2017 19:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikasjp/f19dab8924dea33d9c91b95f25760a83 to your computer and use it in GitHub Desktop.
Save mikasjp/f19dab8924dea33d9c91b95f25760a83 to your computer and use it in GitHub Desktop.
using System;
public class PasswordVerificator
{
public static void Main()
{
string AuthenticationResult = AuthenticateUser("admin", "supersecretpassword")?"User authenticated!":"Access denied!";
Console.WriteLine(AuthenticationResult);
}
public static bool AuthenticateUser(string user, string password)
{
return (user=="admin" && password=="supersecretpassword");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment