к каталогу

📦 bcrypt.net/ BcryptNet

BCrypt.Net - Bringing updates to the original bcrypt package

Открыть на GitHubобновлён 2нед назад
Звёзды
993
Форки
115
За неделю
За месяц
Рост %
Язык
C#

Установка и запуск

Quick Start

To Hash a password:

File-scoped namespaces are shown; imagine curly brackets if you need to.

Top level namespace

namespace MyDotNetProject;

using BCryptNet;

// Hash a password
string passwordHash =  BCrypt.HashPassword("my password");

// Verify a password
if(BCrypt.Verify("my password", passwordHash))
{
    // Password is correct
}

Note: Although this library allows you to supply your own salt, it is highly advisable that you allow the library to generate the salt for you. These methods are supplied to maintain compatibility and for more advanced cross-platform requirements that may necessitate their use.

This implementation on hashing will generate a salt automatically for you with the work factor (2^number of rounds) set to 11 (which matches the default across most implementation and is currently viewed as a good level of security/risk).

There are various examples in our test-harness folder and unit-tests

Из README репозитория · полный README на GitHub

Категории

Теги

algorithmbcryptblowfishc-sharpcipherhashmicrosoftnetnetcorenugetpassword-hashsecurity