https://github.com/soenneker/soenneker.hashing.bcrypt
A utility library for BCrypt hashing and verification
https://github.com/soenneker/soenneker.hashing.bcrypt
bcrypt bcryptutil csharp dotnet hash hashing sha util
Last synced: 5 months ago
JSON representation
A utility library for BCrypt hashing and verification
- Host: GitHub
- URL: https://github.com/soenneker/soenneker.hashing.bcrypt
- Owner: soenneker
- License: mit
- Created: 2024-12-09T23:22:13.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-12-09T23:40:27.000Z (10 months ago)
- Last Synced: 2024-12-10T00:27:58.523Z (10 months ago)
- Topics: bcrypt, bcryptutil, csharp, dotnet, hash, hashing, sha, util
- Language: C#
- Homepage: https://soenneker.com
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.nuget.org/packages/soenneker.hashing.bcrypt/)
[](https://github.com/soenneker/soenneker.hashing.bcrypt/actions/workflows/publish-package.yml)
[](https://www.nuget.org/packages/soenneker.hashing.bcrypt/)#  Soenneker.Hashing.BCrypt
### A utility library for BCrypt hashing and verification## Features
- **Hash passwords**: Securely hash passwords.
- **Verify passwords**: Check if a password matches a hash.
- **Custom security**: Adjust the `workFactor` for extra security.## Installation
```
dotnet add package Soenneker.Hashing.BCrypt
```## Usage
### Hash a Password
```csharp
string hash = BCryptUtil.Hash("MyPassword");
```### Verify a Password
```csharp
bool isValid = BCryptUtil.Verify("MyPassword", hash);
```### Custom Work Factor
```csharp
string hash = BCryptUtil.Hash("MyPassword", workFactor: 12);
```