Created
April 18, 2017 19:05
-
-
Save mikasjp/f19dab8924dea33d9c91b95f25760a83 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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