Skip to content

jimmy2saints/SimplePassword

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimplePassword

This is a simple class for creating salted password hashes.

Typical use would be:

var passwordHash = new SaltedPasswordHash("someClearTextPassword");
SaveToDatebase(passwordHash.Hash, passwordHash.Salt);

Later to verify the password

var hash = GetHashFromDatabase();
var salt = GetSaltFromDatabase();
var passwordHash = new SaltedPasswordHash(hash,salt);
bool verified = passwordHash.Verify("someClearTextPassword");
if(verified)
	// Log user in, or similar

Look at the tests to see how it behaves:

https://github.com/jimmy2saints/SimplePassword/blob/master/SimplePassword.Tests/CreateAndVerifyPassword.cs

About

Simple way of creating and verifying salted password hashes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages