Updates the salt hashing example in passwordhasher.cs for dotnet 6#26233
Conversation
…ing RandomNumberGenerator instead RNGCryptoServiceProvider (outdated)
|
Hello @viniciusmorgado ... Thanks for sending this in. This change must be versioned, so inside this folder ... ... create ... structure the markdown for Lines 22-24 like this (and I'm adding in a little INCLUDE that we use now for reference source to help devs find the right version of ref source code) ... :::moniker range=">= aspnetcore-6.0"
[!code-csharp[](password-hashing/samples/6.x/passwordhasher.cs)]
:::moniker-end
:::moniker range="< aspnetcore-6.0"
[!code-csharp[](password-hashing/samples/5.x/passwordhasher.cs)]
:::moniker-end
See the [source code](https://github.com/dotnet/AspNetCore/blob/main/src/Identity/Extensions.Core/src/PasswordHasher.cs) for ASP.NET Core Identity's `PasswordHasher` type for a real-world use case.
[!INCLUDE[](~/includes/aspnetcore-repo-ref-source-links.md)]However, you might need to duplicate all of the content in the article if this change requires some or all of the earlier content (the paragraphs above the code link prior to Line 22) to change (i.e., the existing content is incorrect for 6.0 or later and/or the guidance needs to call out what's going on with the |
|
@viniciusmorgado ... I'd prefer not to submit a commit to your PR to resolve this (I'm OOF until Friday); so if you feel like you'd like to leave the versioning updates to the team, then we'll either ping one of the other doc authors to commit to your branch or they'll close this and submit a new PR with all of the updates. Let me know how you would like to proceed. 👂 |
| * Salt: SqSBFnfUBCRpH/yd9soRDQ== | ||
| * Hashed: rWc4HTeqV7SA5eGWUEx7t4n5N8gyHgB4sVLTxtpsZNc= | ||
| */ No newline at end of file |
There was a problem hiding this comment.
Sample output shouldn't be changed.
|
@viniciusmorgado @guardrex I'll get this cleaned up. |
|
Thx @Rick-Anderson 🍻! |
Thanks @guardrex Hi @Rick-Anderson, I commit an update with the versioning of the passwordhasher.cs file, for the update of the content in password-hashing.md I need to duplicate all the content in the article, should I versioning the file as well? And can the file be versioned directly on Edit1: Sorry I don´t answer @guardrex question, If someone on the team wants to close this request and submit a new PR with all of the updates it ´s ok to me. |
|
Thanks for the contribution. Be sure to check out your name as a contributor about the 3rd of next month on the What's new page in the Community contributors section at the bottom. |

Updates the salt hashing example in passwordhasher.cs for dotnet 6 using RandomNumberGenerator instead RNGCryptoServiceProvider (outdated).