Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/neoKushan/BCrypt.Net-Core
A .net Core port of BCrypt.net
https://github.com/neoKushan/BCrypt.Net-Core
Last synced: 3 months ago
JSON representation
A .net Core port of BCrypt.net
- Host: GitHub
- URL: https://github.com/neoKushan/BCrypt.Net-Core
- Owner: neoKushan
- License: bsd-3-clause
- Created: 2016-01-30T14:59:13.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2020-07-11T20:00:48.000Z (over 4 years ago)
- Last Synced: 2024-09-18T20:23:59.711Z (4 months ago)
- Language: C#
- Size: 64.5 KB
- Stars: 217
- Watchers: 17
- Forks: 28
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-dotnet-core - BCrypt.NET-Core - .NET Core port of BCrypt.NET used to store passwords securely. (Frameworks, Libraries and Tools / Cryptography)
- fucking-awesome-dotnet-core - BCrypt.NET-Core - .NET Core port of BCrypt.NET used to store passwords securely. (Frameworks, Libraries and Tools / Cryptography)
- awesome-dotnet-core - BCrypt.NET-Core - .NET Core port of BCrypt.NET used to store passwords securely. (Frameworks, Libraries and Tools / Cryptography)
- awesome-dotnet-core - BCrypt.NET-Core - 用于安全存储密码的BCrypt.NET库。 (框架, 库和工具 / 密码)
README
# BCrypt.Net-Core
A .net Core port of BCrypt.net, with some feature and security enhancements.Compatible with both the full .net framework and .net core (Netstandard 1.3).
It should be a drop-in replacement for BCrypt.net as the namespaces are unchanged.
[![kushan MyGet Build Status](https://www.myget.org/BuildSource/Badge/kushan?identifier=ebbdc384-57ab-4131-ac19-599d355302ce)](https://www.myget.org/)
# How to use
Standard use:
```C#
// hash and save a password
hashedPassword = BCrypt.Net.BCrypt.HashPassword(clearTextPassword);// check a password
bool validPassword = BCrypt.Net.BCrypt.Verify(userSubmittedPassword, hashedPassword);
```If you need to specify a different salt revision when generating hashes, you can pass in a SaltRevision parameter:
```C#
// hash and save a password
hashedPassword = BCrypt.Net.BCrypt.HashPassword(clearTextPassword, SaltRevision.Revision2A);
```This is only recommended if you're dealing with legacy systems, otherwise you should use the default of 2b. Note that the salt algorithm does not change, it will generate a correct bcrypt hash in all known cases.
# Disclaimer
I did not write this library, I merely ported it to .net core. All credit goes to Ryan D. Emerle for porting BCrypt to .net in the first place.# Original Project
The original project can be found at Codeplex: https://bcrypt.codeplex.com/