퇴근5분전

this.textBox2.Text = FormsAuthentication.HashPasswordForStoringInConfigFile( this.textBox1.Text, "sha1");
this.textBox3.Text =  FormsAuthentication.HashPasswordForStoringInConfigFile(this.textBox1.Text,"md5"); 
암호화 하는 메서드임

db상에서 패스워드를 쉽게 확인 불가능하게 해야 할때 사용( 주로 요새 쓰는듯 )

바뀐 데이타로 pws를 비교하면 됨.
ex)
// 1111  을 암호화 한 문자열임.
if( "011C945F30CE2CBAFC452F39840F025693339C42" == FormsAuthentication.HashPasswordForStoringInConfigFile( this.textBox4.Text, "sha1") )
{
 MessageBox.Show("빙고");
}
else
{
 MessageBox.Show("땡!");
}



두가지 암호화 타입이 있음 sha1, md5

둘중 하나로 쓰면 됨.

복호 안됨 ( 사실 해본적도 없음 ).

'# 2) .Net ( Vs 2005 ) > 기타' 카테고리의 다른 글

Xml 직렬화...  (0) 2009.05.08
정규식] 똑같은 글자가 몇개?  (2) 2009.05.08
인터페이스와델리게이트조합1  (2) 2009.05.08
DB로컬 연결시 문구  (0) 2009.05.02
큐브~  (0) 2009.05.02