FormsAuthentication.HashPasswordForStoringInConfigFile(String, String) Méthode

Définition

Attention

The recommended alternative is to use the Membership APIs, such as Membership.CreateUser. For more information, see http://go.microsoft.com/fwlink/?LinkId=252463.

Produit un mot de passe de hachage adapté au stockage dans un fichier de configuration en fonction du mot de passe et de l’algorithme de hachage spécifiés.

public:
 static System::String ^ HashPasswordForStoringInConfigFile(System::String ^ password, System::String ^ passwordFormat);
public static string HashPasswordForStoringInConfigFile(string password, string passwordFormat);
[System.Obsolete("The recommended alternative is to use the Membership APIs, such as Membership.CreateUser. For more information, see http://go.microsoft.com/fwlink/?LinkId=252463.")]
public static string HashPasswordForStoringInConfigFile(string password, string passwordFormat);
static member HashPasswordForStoringInConfigFile : string * string -> string
[<System.Obsolete("The recommended alternative is to use the Membership APIs, such as Membership.CreateUser. For more information, see http://go.microsoft.com/fwlink/?LinkId=252463.")>]
static member HashPasswordForStoringInConfigFile : string * string -> string
Public Shared Function HashPasswordForStoringInConfigFile (password As String, passwordFormat As String) As String

Paramètres

password
String

Mot de passe à hacher.

passwordFormat
String

Algorithme de hachage à utiliser. passwordFormat est une String valeur qui représente l’une FormsAuthPasswordFormat des valeurs d’énumération.

Retours

Mot de passe haché.

Attributs

Exceptions

password est null

-ou-

passwordFormat a la valeur null.

passwordFormat n’est pas une valeur valide FormsAuthPasswordFormat .

Remarques

Cette méthode est obsolète. Vous pouvez également utiliser ASP.NET appartenance pour stocker les informations d’identification de l’utilisateur. Pour plus d’informations, consultez Gestion des utilisateurs à l’aide de l’appartenance.

S’applique à