Skip to content

scottbrady91/ScottBrady91.AspNetCore.Identity.BCryptPasswordHasher

Repository files navigation

BCrypt Password Hasher for ASP.NET Core Identity

NuGet

An implementation of IPasswordHasher<TUser> using BCrypt.NET - next.

Installation

services.AddIdentity<TUser, TRole>();
services.AddScoped<IPasswordHasher<TUser>, BCryptPasswordHasher<TUser>>();

Options

  • WorkFactor: int
  • EnhancedEntropy: bool (Obsolete due to password shucking vulnerability)

Register with:

services.Configure<BCryptPasswordHasherOptions>(options => {
    options.WorkFactor = 11;
    options.EnhancedEntropy = false;
});

.NET Support

This library supports Current and LTS versions of .NET.