نقل قول: رمز نگاری برای پسورد
من مقداری پاسکال کارکردم ببین کمکت میکنه یانه:
string Getpasswd(string InitVal)
{
Random rnd=new Random();
int i, j;
string S;
RandSeed = 87456;
S = "";
for ( i = 1; i <= InitVal.Length; i++)
{
j = rnd.Next(1, 26 * 2 + 10) + 1;
switch (j)
{
case 1..26:
S=S+Convert.ToChar(Convert.ToInt32('A')+(j-1));
case 27..52:
S=S+Convert.ToChar(Convert.ToInt32('a')+(j-27));
case 53..62:
S=S+Convert.ToChar(Convert.ToInt32('0')+(j-53));
}
}
Result="";
for (int i = 1; i <InitVal.Length; i++)
{
Result=Result+Convert.ToChar(Convert.ToInt32(InitV al[i] ^ Convert.ToInt32(S[i]) );
}
}