Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tallesl/net-Hash
A password hasher.
https://github.com/tallesl/net-Hash
cryptography csharp dot-net hash nuget password pbkdf2 salt
Last synced: about 2 months ago
JSON representation
A password hasher.
- Host: GitHub
- URL: https://github.com/tallesl/net-Hash
- Owner: tallesl
- Created: 2015-03-25T17:45:29.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-09-17T17:32:04.000Z (over 6 years ago)
- Last Synced: 2024-12-13T20:17:58.754Z (about 2 months ago)
- Topics: cryptography, csharp, dot-net, hash, nuget, password, pbkdf2, salt
- Language: C#
- Homepage:
- Size: 18.6 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hash
[![][build-img]][build]
[![][nuget-img]][nuget]A password hasher that generates a unique [salt] for each hash and hashes using [PBKDF2].
[build]: https://ci.appveyor.com/project/TallesL/net-hash
[build-img]: https://ci.appveyor.com/api/projects/status/github/tallesl/net-hash?svg=true
[nuget]: https://www.nuget.org/packages/Hash
[nuget-img]: https://badge.fury.io/nu/Hash.svg
[salt]: http://en.wikipedia.org/wiki/Salt_%28cryptography%29
[PBKDF2]: http://en.wikipedia.org/wiki/PBKDF2## Usage
```cs
var plainPassword = "my cr4zy pa$$w0rd";// gives a HashedPassword object
// which has Hash and Salt properties ready to be stored somewhere
var hash = HashedPassword.New(plainPassword);// checking the plain text password against the hashed one
if (hash.Check(plainPassword))
{
// the given password matches the given hash
}
else
{
// wrong password
}
```