高分求一解密函数的加密函数
下面是对应的解密函数,求对应的加密函数
--------------------编程问答-------------------- 测试可用再追加分 --------------------编程问答-------------------- 木有人来看啊...... --------------------编程问答-------------------- 测试可用再追加分
public static string CodeReturn(string mCode)
{
string[] astrResult = mCode.Split(new char[] { '|' });
string strchr = "";
long intLength = astrResult.Length / 2;
if (intLength == 0L)
{
return "";
}
long[] alngrefArray = CreatArray(intLength);
if (intLength == 0L)
{
return "";
}
for (int i = 0; i < intLength; i++)
{
long s = (((alngrefArray[i] * Convert.ToInt16(astrResult[i])) + Convert.ToInt16(astrResult[(int)((IntPtr)(i + intLength))])) - 14L) / 0x49L;
ASCIIEncoding asciiEncoding = new ASCIIEncoding();
byte[] byteArray = new byte[] { (byte)s };
string strCharacter = asciiEncoding.GetString(byteArray);
strchr = strchr + strCharacter;
}
return strchr;
}
public static long[] CreatArray(long mlength)
{
long[] mArray = new long[mlength];
mArray[0] = 0x34L;
if (mlength > 1L)
{
mArray[1] = 0x21fL;
}
for (long j = 2L; j < mlength; j += 1L)
{
mArray[(int)((IntPtr)j)] = mArray[(int)((IntPtr)(j - 1L))] + mArray[(int)((IntPtr)(j - 2L))];
}
return mArray;
}
补充:.NET技术 , C#