Saturday, February 7, 2009

Password Encription

public void EncryptPassword(string strPwd)
{
int i;
double x = 1.0,j = 0;
for (i = 1; i <= strPwd.Length; i++)
{
char str = char.Parse(strPwd.Substring(i-1, 1));
x = Math.Sqrt(x * i * Convert.ToInt32(str));
}
for (i = 1; i <= 5; i++)
{
j = x * i * 15;
int val=(int)j;
encrpass = encrpass + Convert.ToString(val, 16).ToUpper();
}

}

No comments: