基本信息
源码名称:AES加密工具(CPS生成链接运用)
源码大小:0.22M
文件格式:.rar
开发语言:C#
更新时间:2015-09-25
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 2 元×
微信扫码支付:2 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Text.RegularExpressions; using System.Windows.Forms; namespace CPS_链接生成 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { } string url = "http://login.lvmama.com/nsso/cps/newRedirect.do?"; private void button1_Click(object sender, EventArgs e) { string tabname=tabControl1.SelectedTab.Name; if ("tabPage2" == tabname) { string jiamistring = "losc=" this.textLosc.Text.Trim().ToLower() "&source=" this.textSource.Text.Trim().ToLower() "&serviceId=" this.textServiceId.Text.Trim().ToLower() "&" this.textBack.Text.Trim().ToLower(); this.textBox2.Text = url "source=" this.textSource.Text.Trim().ToLower() "&keyword=" EncryptUtil.Encrypt(jiamistring, this.key.Text.Trim()); } else { try { string name = new Regex(@"source=(\S*)\b&").Matches(this.textBox1.Text.ToLower())[0].Groups[1].Value; if (name.IndexOf("&") > 0) { name = name.Remove(name.IndexOf("&")); } string losc = new Regex(@"losc=(\S*)\b&").Matches(this.textBox1.Text.ToLower())[0].Groups[1].Value; if (losc.IndexOf("&") > 0) { losc = losc.Remove(losc.IndexOf("&")); } this.textBox3.Text = "分销商编号:" name "\r 三级编码:" losc; } catch { } try { this.textBox2.Text = EncryptUtil.Encrypt(this.textBox1.Text.Trim(), this.key.Text.Trim()); } catch { MessageBox.Show("密文或者秘钥出错!\t\n(秘钥的位数必须是16的倍数)"); } } } private void button2_Click(object sender, EventArgs e) { try { this.textBox2.Text = EncryptUtil.Decrypt(this.textBox1.Text.Trim(), this.key.Text.Trim()); } catch { MessageBox.Show("密文或者秘钥出错!\t\n(秘钥的位数必须是16的倍数)"); } try { string name = new Regex(@"source=(\S*)\b&").Matches(this.textBox2.Text.ToLower())[0].Groups[1].Value; if (name.IndexOf("&") > 0) { name = name.Remove(name.IndexOf("&") ); } string losc = new Regex(@"losc=(\S*)\b&").Matches(this.textBox2.Text.ToLower())[0].Groups[1].Value; if (losc.IndexOf("&") > 0) { losc = losc.Remove(losc.IndexOf("&") ); } this.textBox3.Text = "分销商编号:" name "\r 三级编码:" losc; } catch { } } private void label3_Click(object sender, EventArgs e) { } } }