FormsAuthenticationCredentials.PasswordFormat Свойство

Определение

Получает или задает формат пароля.

public:
 property System::Web::Configuration::FormsAuthPasswordFormat PasswordFormat { System::Web::Configuration::FormsAuthPasswordFormat get(); void set(System::Web::Configuration::FormsAuthPasswordFormat value); };
[System.Configuration.ConfigurationProperty("passwordFormat", DefaultValue=System.Web.Configuration.FormsAuthPasswordFormat.SHA1)]
public System.Web.Configuration.FormsAuthPasswordFormat PasswordFormat { get; set; }
[<System.Configuration.ConfigurationProperty("passwordFormat", DefaultValue=System.Web.Configuration.FormsAuthPasswordFormat.SHA1)>]
member this.PasswordFormat : System.Web.Configuration.FormsAuthPasswordFormat with get, set
Public Property PasswordFormat As FormsAuthPasswordFormat

Значение свойства

FormsAuthPasswordFormat

Одно из значений перечисления FormsAuthPasswordFormat.

Атрибуты

Примеры

В следующем примере кода показано, как осуществляется доступ к свойству PasswordFormat. Ознакомьтесь с примером FormsAuthenticationCredentials кода в разделе класса, чтобы узнать, как получить раздел.

// Get the current PasswordFormat property value.
FormsAuthPasswordFormat currentPasswordFormat =
formsAuthenticationCredentials.PasswordFormat;

// Set the PasswordFormat property value.
// This example uses the SHA1 algorithm.
// Due to collision problems with SHA1, Microsoft recommends SHA256 or better.
formsAuthenticationCredentials.PasswordFormat = 
    FormsAuthPasswordFormat.SHA1;
' Get the current PasswordFormat property value.
  Dim currentPasswordFormat _
  As FormsAuthPasswordFormat = _
  formsAuthenticationCredentials.PasswordFormat


' Set the PasswordFormat property value.
' This example uses the SHA1 algorithm.
' Due to collision problems with SHA1, Microsoft recommends SHA256 or better.
  formsAuthenticationCredentials.PasswordFormat = _
  FormsAuthPasswordFormat.SHA1

Применяется к

См. также раздел