What RNG does the SQLMembershipProvider use to generate the SALT?

Raul Peruzzi 0 Reputation points
2023-05-05T21:14:45.3633333+00:00
I am using Membership Providers to manage the users. The provider we use is SqlMembershipProvider.

I need to know what is the RNG used to generate the SALT.

Through the following link https://referencesource.microsoft.com/#system.web/Security/SQLMembershipProvider.cs,e4fa4368d420c48a, I see that the function that generates the SALT is using the RNGCryptoServiceProvider class to generate the RNG.

But according to the microsoft documentation, that class is deprecated.

I need to confirm the RNG algorithm used by the SqlMembershipProvider.

Thank you so much
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,396 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 60,376 Reputation points
    2023-05-05T22:47:35.6633333+00:00

    The SQLMembershipProvider is fairly old code (almost a decade since last update) as is most of the 4.8 framework. This code base is no longer updated and only security fixes are supplied.

    for creating a salt, RNGCryptoServiceProvider perfectly fine. It should not be used for new code, or code you expect to migrate to .net core.

    0 comments No comments