当前位置:编程学习 > C#/ASP.NET >>

高分求一解密函数的加密函数


下面是对应的解密函数,求对应的加密函数



 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#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,