다음을 통해 공유


FormsAuthenticationUser.Password 속성

정의

사용자 암호를 가져오거나 설정합니다.

public:
 property System::String ^ Password { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("password", DefaultValue="", IsRequired=true)]
[System.Configuration.StringValidator]
public string Password { get; set; }
[<System.Configuration.ConfigurationProperty("password", DefaultValue="", IsRequired=true)>]
[<System.Configuration.StringValidator>]
member this.Password : string with get, set
Public Property Password As String

속성 값

String

애플리케이션에 필요한 사용자 암호입니다.

특성

예제

다음 코드 예제에서는 Password 속성을 사용하는 방법을 보여 줍니다. 코드 예제에서는 참조는 FormsAuthenticationUser 클래스 항목의 섹션을 가져오는 방법을 알아봅니다.


// Using the Password property.

// Get current password.
string currentPassword = 
    formsAuthenticationUsers[0].Password;

// Set a SHA1 encrypted password.
// This example uses the SHA1 algorithm.
// Due to collision problems with SHA1, Microsoft recommends SHA256 or better.
formsAuthenticationUsers[0].Password =
    "5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8";
' Using the Password property.
' Get current password.
  Dim currentPassword As String = _
  formsAuthenticationUsers(0).Password

' Set a SHA1 encrypted password.
' This example uses the SHA1 algorithm.
' Due to collision problems with SHA1, Microsoft recommends SHA256 or better.
  formsAuthenticationUsers(0).Password = _
  "5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8"

적용 대상