首页新闻找找看学习计划

C#的解密算法,求对应加密的代码

0
悬赏园豆:10 [已关闭问题] 关闭于 2013-01-23 11:24
public string string_14;
        public static string smethod_1(string string_0)
        {
            if (string_0 == " ")
            {
                return " ";
            }
            StringBuilder builder = new StringBuilder();
            for (int i = 0; i < string_0.Length; i++)
            {
                builder.Append((char)(string_0[i] - '\x0004'));
            }
            return builder.ToString();
        }
        

        public static string smethod_20(string string_0, string string_1, string string_2)
        {
            RijndaelManaged managed = new RijndaelManaged
            {
                Mode = CipherMode.CBC,
                Padding = PaddingMode.PKCS7,
                KeySize = 0x80,
                BlockSize = 0x80
            };
            byte[] inputBuffer = Convert.FromBase64String(string_0);
            byte[] bytes = Encoding.UTF8.GetBytes(string_1);
            byte[] destinationArray = new byte[0x10];
            int length = bytes.Length;
            if (length > destinationArray.Length)
            {
                length = destinationArray.Length;
            }
            Array.Copy(bytes, destinationArray, length);
            managed.Key = destinationArray;
            string_2 = string_2.Substring(0, 0x10);
            byte[] buffer4 = Encoding.UTF8.GetBytes(string_2);
            managed.IV = buffer4;
            byte[] buffer5 = managed.CreateDecryptor().TransformFinalBlock(inputBuffer, 0, inputBuffer.Length);
            return Encoding.UTF8.GetString(buffer5);
        }





       

        
       
        

      





        private void button2_Click(object sender, EventArgs e)
        {
            string str15 = Application.StartupPath + @"\Settings\dictionary.dat";
            StreamReader reader5 = new StreamReader(str15);
            this.string_14 = reader5.ReadToEnd();
            reader5.Close();
            this.string_14 = smethod_1(smethod_1(this.string_14));
            this.string_14 = smethod_20(this.string_14, "hijklmnopqrstuvwxyzabcdefg", "uvwxyzabcdefghijklmnopqrst");

            richTextBox1.Text = string_14;
        }
       

相应的加密程序应该怎么写啊

 

这个是我从一个软件里面提取的

shineme的主页 shineme | 初学一级 | 园豆:29
提问于:2013-01-16 00:01
< >
分享
所有回答(2)
0

不知道用的什么加密方法啊?

chenping2008 | 园豆:9836 (大侠五级) | 2013-01-16 09:15
0
Launcher | 园豆:45045 (高人七级) | 2013-01-16 09:30
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册