다음을 통해 공유


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

적용 대상

추가 정보