Created
March 26, 2014 00:42
-
-
Save wshaddix/9774709 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
// get the password from the user | |
var clearTextPassword = "Passw0rd"; | |
// create the password hash | |
var passwordHash = PasswordHash.CreateHash(clearTextPassword); | |
// store the password hash in a data store | |
// ... | |
// (later when the user tries to login) | |
// fetch the user's password hash from the data store | |
// ... | |
// validate the password | |
var isValid = PasswordHash.ValidatePassword(clearTextPassword, passwordHash); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment