PasswordHasherOptions default quick fix (#32019)
parent
e3eda6d780
commit
42ce542283
|
@ -5,7 +5,7 @@ description: Understand ASP.NET Core Identity default values and learn how to co
|
|||
ms.author: riande
|
||||
monikerRange: '>= aspnetcore-3.1'
|
||||
ms.custom: mvc
|
||||
ms.date: 2/15/2020
|
||||
ms.date: 3/09/2024
|
||||
uid: security/authentication/identity-configuration
|
||||
---
|
||||
# Configure ASP.NET Core Identity
|
||||
|
@ -132,7 +132,7 @@ For more information, see <xref:Microsoft.AspNetCore.Authentication.Cookies.Cook
|
|||
| Option | Description |
|
||||
|--|--|
|
||||
| <xref:Microsoft.AspNetCore.Identity.PasswordHasherOptions.CompatibilityMode> | The compatibility mode used when hashing new passwords. Defaults to <xref:Microsoft.AspNetCore.Identity.PasswordHasherCompatibilityMode.IdentityV3>. The first byte of a hashed password, called a *format marker*, specifies the version of the hashing algorithm used to hash the password. When verifying a password against a hash, the <xref:Microsoft.AspNetCore.Identity.PasswordHasher%601.VerifyHashedPassword%2A> method selects the correct algorithm based on the first byte. A client is able to authenticate regardless of which version of the algorithm was used to hash the password. Setting the compatibility mode affects the hashing of *new passwords*. |
|
||||
| <xref:Microsoft.AspNetCore.Identity.PasswordHasherOptions.IterationCount> | The number of iterations used when hashing passwords using PBKDF2. This value is only used when the <xref:Microsoft.AspNetCore.Identity.PasswordHasherOptions.CompatibilityMode> is set to <xref:Microsoft.AspNetCore.Identity.PasswordHasherCompatibilityMode.IdentityV3>. The value must be a positive integer and defaults to `10000`. |
|
||||
| <xref:Microsoft.AspNetCore.Identity.PasswordHasherOptions.IterationCount> | The number of iterations used when hashing passwords using PBKDF2. This value is only used when the <xref:Microsoft.AspNetCore.Identity.PasswordHasherOptions.CompatibilityMode> is set to <xref:Microsoft.AspNetCore.Identity.PasswordHasherCompatibilityMode.IdentityV3>. The value must be a positive integer and defaults to `100000`. |
|
||||
|
||||
In the following example, the <xref:Microsoft.AspNetCore.Identity.PasswordHasherOptions.IterationCount> is set to `12000` in `Program.cs`:
|
||||
|
||||
|
|
Loading…
Reference in New Issue