Monday, June 16, 2014

Password Encryption Code

Code to encrypt a password
public string ecrypt(string pwd)
{
string temp = "";
int len = pwd.Length;
if (len == 5)
{
temp = pwd + pwd.Substring((len - 3), 3);
}
else if (len == 6)
{
temp = pwd + pwd.Substring((len - 2), 2);
}
else if (len == 7)
{
temp = pwd + pwd.Substring((len - 7), 1);
}
char[] chartemparr = new char[temp.Length];
chartemparr=temp.ToCharArray();
int[] inttemparr = new int[chartemparr.Length];
 //chartemparr.CopyTo(inttemparr, 0);
int i=0,j=0;

for (i = 0; i < temp = "" i =" 0;" j =" inttemparr[i]+1;">);
}

return temp;
}

1 comment: